Creating a new form instance with Application.Run
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
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

bilnaadRank #2,169 · 655 pointsPosted Dec 17, 2004, 12:57 PM EST
dmosborne3 pointsPosted Dec 17, 2004, 1:15 PM EST
bilnaadRank #2,169 · 655 pointsPosted Dec 17, 2004, 3:06 PM EST