vb.net - How does the implicitly created Form work? -


If I create a new Windows project and add another form (Form 2), then I only created it inherently I can see the form showing the class name:

  Form2.Show ()  

If I look at the definition of the process, then it Form class is not listed as a shared member, how to call Show () in the name of the Form 2 class I packed?

I tried to do it, and then decompiled executable with ILSpy.

It seems that quietly in Form2.Show () MyProject.Forms.Form2.Show () instead.

MyProject.Forms is a generated class that captures lazy singleton insertion of each form in the project.

It appears that there is a feature of IDE instead of compiler, because in LINQPad, I need "reference to an non-shared member to object reference."


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -