So I'm mostly new to C#, but I have created Forms before with it. I've searched for over an hour to try to find an answer, but everything I find either is hard to understand or worded in a way I don't understand, or it doesn't appear relevant.
The most relevant results appear to be these:
ObjectDisposedException when .Show()'ing a form that shouldn't be disposed
Exception when closing Form (thread + invoke)
I still don't understand though.
What I am doing is this:
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 Form = new Form1();
Application.Run(Form);
Form.Show(); // Visual Studio highlights this line.
Form.UserData.Rows.Add(new string[] { "TestName", "1337" }); // I'm trying to get used to DataGridViews.
Form.UserData.Rows.Add(new string[] { "AnotherName", "9015" });
I don't see what I'm doing that requires it when close the only Form in my project.