WinForms, how to find all the active windows of specific instance type.
A:
You could do something like this using LINQ:
var forms = from f in Application.OpenForms.OfType<Form1>()
select f;
Or if you had additional criteria, something like:
var forms = from f in Application.OpenForms.OfType<CustomerForm>()
where f.HasChanges
select f;
Josh Einstein
2010-07-28 02:13:48