Sunday 6 June 2010

One-liners: Designer autogenerates Property = null

Sick of the c# designer setting your control's property to null in the InitializeComponent() function? Then simply set the property's default value to null so InitializeComponent() doesn't have to!

[DefaultValue(null)]
My Property...

No comments: