I recently got tossed some C# code to make some minor cosmetic changes to. When I open up some of the files in Visual Studio though, I get errors saying:
To prevent possible data loss…
The first of these errors is:
Object reference not set to an instance of an object.
I can follow the stack trace fine, but I’m not sure what I really should be looking for in this situation. Also, the end of my stack trace has a call that ends in “PageScroller..ctor()”.
Based on a little Google research, I’m assuming that means call the constructor. Is that true?
You have a bug in design mode for some custom control, probably PageScroller, and apparently starting from the constructor. Perhaps there’s some code in the constructor that returns null in design mode, and the null is not checked for.