Adding Constructors to WinForms in .NET 2.0
Properties aren't always necessary for WinForms. Sometimes, I like to create
alternate constructors and pass the information in through a parameter to a
private member.
In VS2003, this worked without incident. My forms were always displayed just
fine. However, in VS2005, when I displayed the form, it was the default size,
and didn't have any controls. I spent about 30 minutes trying to track down why
I was getting NullReferenceExceptions trying to bind to to a DataGridView, and
the form was blank. I finally had to crack open Reflector and see that the
compiler wasn't as nice to me as it used to be.
I filed this as a
bug in the MSDN Product Feedback Center, so if you can reproduce it, please
vote on it.