James Curran
Note: not just the open forms like with Application.OpenForms but something like Application.AllForms (if only it would exist...) |
|
Application.OpenForms is conceivable. Application.AllForms is a phyisical impossiblity.
As an analogue, imagine a property Application.AllInts, which should include not just all ints that you've declared, but all int that you might declare. It would have to be infinite.
For an example closer to what you've asked, imagine an project which include three forms: form1.cs, form2.cs, and form3.cs. Form1 opens two different instances of Form2. Do both instances of Form2 appear in AllForms or just one, and if one, which one Alternately, if no instance of Form3 is created, does it appear in the AllForms And if so, what instances of Form3.
The problem, which often happened with class like forms, where you general only create one instance, is a blurring of the line between a class and an object.