I have a Winforms application that starts up with a login screen. If the user’s login credentials are good, this method is called:
public void success()
{
mainForm index = new mainForm();
index.Show();
this.Close();
}
I thought that this would open the mainForm
and close the login form, however when I run this, it closes the whole application. Why is that? I’m pretty new to C# and OOP in general, so any tips are appreciated!
I tried doing something like this: Closing a form and then call another one
But I still got the same result.
Thanks :)