What is the difference between public static void Main() and private static void Main() in a C# console application?

前端 未结 10 1170
梦毁少年i
梦毁少年i 2021-02-06 20:32

What is the difference between

public static void Main()

and

private static void Main()

in a C# console appli

10条回答
  •  名媛妹妹
    2021-02-06 21:29

    Aside from the normal public and private access modifier functionality, nothing. Both are valid entry points.

    See: Why is the entry point allowed to be private? and Why is Main method private?

提交回复
热议问题