Why do I get a "cs5001: does not have an entry point defined" error when compiling?



Why do I get a "cs5001: does not have an entry point defined" error when compiling?..

Answer / Anuj Kumar Srivastava

The "cs5001" error is usually due to the fact that your C# code doesn't contain a valid 'Main()' method. The 'Main()' method is the entry point for console applications, and it must be declared in the same file where you intend to run the program.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

When To use HashTable In C#

1 Answers   Infosys,


How to properly clean up excel interop objects?

1 Answers  


can we declare a variable by name "this" in a class? Please explain?

3 Answers   IBM,


What is main thread in c#?

1 Answers  


Why is ienumerable used?

1 Answers  


how to convert String array to StringBuilder array or vice versa?

3 Answers   Wipro,


What is difference between interface and abstraction?

1 Answers  


What are the properties of c#?

1 Answers  


What is callback delegate in c#?

1 Answers  


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

1 Answers   Siebel,


Give 2 scenarios where static constructors can be used?

1 Answers  


What is the execution entry point for a c# console application?

1 Answers  


Categories