3
Answers

creating a new form instance with Application.Run

dmosborne

dmosborne

19y
2.2k
1
I'm wondering why the following line of code is valid: Application.Run(new MyForm()); (Assuming the class MyForm exists) Does this result in the creation of a new instance of the MyForm class? If so, why don't you have to give the instance a name? I would expect you would have to do the following: private MyForm MyFormInstance; then, later... Application.Run(MyFormInstance = new MyForm()); Thanks. Diluter
Answers (3)