Main method entry point with string argument gives “does not contain … suitable … entry point” error

前端 未结 5 916
死守一世寂寞
死守一世寂寞 2021-01-12 11:15

Why does the code block below give a compile error of \"does not contain a static \'Main\' method suitable for an entry point\"?

namespace MyConApp
{
    cla         


        
5条回答
  •  Happy的楠姐
    2021-01-12 11:52

    The only valid signatures for Main method are :

    static void Main()
    

    and

    static void Main(string[])
    

    static void Main(string) is not a valid signature for Main method.

提交回复
热议问题