All C# programs need to contain the Main() method. Essentially this is where the program starts. The code you posted is just a small part of the entire application. You must have removed the location where main had been residing.
MSDN Article on Main
Updated for comments:
A new Windows Form App has a Program class that instantiates the form that you want.
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
Try copying that over to a new file called program.cs. Make sure that Form1 now points to the form you created in the applications.