I use a login from to access the main application. There is a logout option from the main application, which i'm not able to implement, even after googling and trying some things like:
Application.Restart();
or
Application.OpenForms["loginForm"].ShowDialog();
mainForm.Close();
Help needed to implement a simple logout option. There's an exception thrown, smth like:
InvalidOperationException: Collection was modified; enumeration operation may not execute.
Thnx in advance.