foreach (Form frm in Application.OpenForms)
{
frm.Close();
}
the error occur above code
Collection was modified; enumeration operation may not execute.