Best use of System.Windows.Forms.Application.Run()

Posted by carlos on Stack Overflow See other posts from Stack Overflow or by carlos
Published on 2010-05-18T23:51:59Z Indexed on 2010/05/19 0:00 UTC
Read the original article Hit count: 189

Filed under:

Hello i Have a programa that has starts in a main sub, it executes some code and after that code it opens a form using

System.Windows.Forms.Application.Run(General)

General is a form but also a class, so I wonder what it the pros or cons of using :

System.Windows.Forms.Application.Run(General)

vs

Dim gen as general
System.Windows.Forms.Application.Run(gen)

In the first I am opening a form using the name of the class, and I read that it is best to declare the instance as an object variable.

So far I used the first approach without any problem.

Thanks for your comments !

© Stack Overflow or respective owner

Related posts about vb.net