My App was running OK. But i am getting this error when i try tro run it.

An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll

This is the code
static void Main()
{
Application.Run(new MainForm());
}