Reputation: 4026
I converted a Vb.Net Form (which was previously written in vb6) with sharpdevelop to c#, now i am getting error that no suitable main method can be found.
Any solutions on this?
best regards
Upvotes: 0
Views: 443
Reputation: 273484
Seem like you'll have to fix the project, or maybe rerun the converter with different settings.
A simple way to fix could be:
Upvotes: 1
Reputation: 5100
If you created a C# Windows Forms application, you can find the Main inside Program.cs
EDIT: added sample code Program.cs sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
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());
}
}
}
Upvotes: 1