c# - Console Application Persistent Error does not contain static main method suitable for entry point -


firstly have read on similar questions , have tried everything. @ total loss @ stage. error message follows:

error 1 program 'c:\users\epm\desktop\c# work\projects\consoleapplication10\consoleapplication10\obj\x86\debug\consoleapplication10.exe' not contain static 'main' method suitable entry point

then notice pops after try run despite build error says:

visual studio cannot start debugging because debug target 'c:\users\epm\desktop\c#work\projects\consoleapplication10\consoleapplication10\bin\debug\consoleapplication10.exe' missing. please build project , retry, or set outputpath , assemblyname properties appropriately point @ correct location target assembly.

i've spent many hours trying every solution find on internet , grateful if me out. thank you.

using system; using system.collections.generic; using system.linq; using system.text;  namespace consoleapplication10 {     class program     {          static void main()         {             list<student> list = new list<student>();             list.add(new student() { name = "alan", grade = 100 });             list.add(new student() { name = "jane", grade = 100 });             list.add(new student() { name = "aidan", grade = 90 });             list.add(new student() { name = "bill", grade = 50 });             list.add(new student() { name = "liam", grade = 80 });              list.sort();              foreach (var element in list)             {                 console.writeline(element);             }         }          class student : icomparable<student>         {             public int grade { get; set; }             public string name { get; set; }              public int compareto(student other)             {                 if (this.grade == other.grade)                 {                     return this.name.compareto(other.name);                 }                  else return other.grade.compareto(this.grade);             }              public override string tostring()             {                 return this.grade.tostring() + "," + this.name;             }         }     } } 

the main method of c# program typically looks like:

public static void main(string[] args) {     // code } 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -