DefInstance

  • Thread starter Thread starter afrinspray
  • Start date Start date
A

afrinspray

Guest
Do you guys think its 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 doesnt 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 shouldnt cause any problems as they stand.
 
Microsoft didnt 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 cant just get a default instance of a class, thats what Shared members are for. I hope that makes it clearer.
 
Back
Top