Do you guys think it's good practice to remove the DefInstance functions in an upgraded VB net program? Why did Microsoft remove the ability to access "default forms"?
They had no choice but to remove them. .NET doesn't support them. Simple as that.
And yes, if you have the time to make the proper changes I would remove the DefInstance functions, although they shouldn't cause any problems as they stand.
Microsoft didn't remove the ability per se, you just have to understand that in VB.NET you have Classes, and you have Structures. There is no special case for forms as there was previously. A "form" is just a class with some pre-written code.
You can't just get a default instance of a class, that's what Shared members are for. I hope that makes it clearer.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.