D
Daisy
Another this vs that post.
Any real difference in declaring variables with default values, eg.
public class MyControl : UserControl
{
public int RowHeight = 20;
}
Over just declaring the variable, and setting it to 20 in the Constructor?
Currently, everything in my constructor could be just inside the class
definition, rather than it all be split into the two chunks. Are there
things I can only do in the constructor, any advantages to either?
Any real difference in declaring variables with default values, eg.
public class MyControl : UserControl
{
public int RowHeight = 20;
}
Over just declaring the variable, and setting it to 20 in the Constructor?
Currently, everything in my constructor could be just inside the class
definition, rather than it all be split into the two chunks. Are there
things I can only do in the constructor, any advantages to either?