I am using visual studios and I keep getting the same error.

Error 1 Program 'c:\Users\M\Desktop\C#\Parameter\Parameter\obj\Debug\Parameter.exe' does not contain a static 'Main' method suitable for an entry point C:\Users\M\Desktop\C#\Parameter\Parameter\CSC

How do you properly do a method in visual studios, it seems that I can't do it properly.

5 Years
Discussion Span
Last Post by tinstaafl

So technically, my method is right but not the project's properties?


the problem might be

    /// The main entry point for the application.
    /// </summary>
    static void Main()


There might be no main method in your Class.You have declared classes but none of them have Main() class


Edited by IIM


Main is your program's start point. Without that the program has no idea what to do first. Even if yopu want a certain routine to run first you have to call it from Main. Main is also where any parameters being passed are sent to. If you've been deleting things willy-nilly then you might be better off to copy your code and paste it into a new project, with the code for Main already started for you. Beyond that it's hard to say how to fix it when you haven't shared any code that's broken.

Edited by tinstaafl

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.