Access Form Property with VB.net Instance

On Windows Forms (Vb.net), how can I access properties without an instance (new)?

Form1.Property = "" ??? is braking properties not static? What is called this mode of deceleration?

Until you can access Class1.Property! Thanks

+1
source share
1 answer

VB.Net does some magic that lets you pretend that forms are not instantiated.

Creates a hidden shared instance and converts static calls to instance methods (for example, Form1.Show() ) into calls to instances of this shared instance.

This is done for compatibility with VB6 and should be avoided.

+4
source

Source: https://habr.com/ru/post/958415/


All Articles