0

I'm getting the below error at the time I run the Windows application on my program. Can any one help?

Error: Program 'C:\Users\Owner\Documents\Visual Studio 2008\Projects\Project1\Integer Division\Integer Division\obj\Debug\Integer Division.exe' does not contain a static 'Main' method suitable for an entry point Integer Division

CRoshanLG
  • 498
  • 1
  • 8
  • 20
Jocelyn
  • 396
  • 3
  • 5

2 Answers2

3

You need to have a:

static void Main()
{
}

If you want to "run" something a main is needed. That is basically the main function as the name implies where your program will run. You should look up any class example with a main() inside of it and put your code inside (the one for integral division ?).

Void
  • 402
  • 3
  • 12
0

Does not contain a static 'main' method suitable for an entry point

or

Troubleshooting "program does not contain a static 'Main' method" when it clearly does...?

But it's not related to Integer Division, for sure.

Community
  • 1
  • 1
Francois
  • 10,730
  • 7
  • 47
  • 80
  • integer division must be his project name – Amit Dec 24 '12 at 07:58
  • I think I have the Main method in the program. However I still getting same error. here is the code, please help............ – Jocelyn Dec 24 '12 at 09:18
  • public class frmMain : Form { private Label label1; private Label label2; private TextBox txtOperand2; private TextBox txtResult; private Button btnResult; private Button btnExit; private TextBox txtOperand1; #region Window code private void initializeComponent() { } #endregion public frmMain() { initializeComponent(); } public static void main() { frmMain main = new frmMain(); Application.Run(main); } – Jocelyn Dec 24 '12 at 09:46
  • @YoselinMedina from what you posted it is WinForms application... Try to create new WinForm project and analyze it - your project should have same default classes and same default methods. Be carefull - they **must not** be overriden – Nogard Dec 24 '12 at 10:04