Trying to close all forms except for the main menu using
FormCollection formsList = Application.OpenForms;
with a foreach loop and saying,
As the error states, you can't modify a collection in its foreach.
Instead, you can use a backwards for loop.
for