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

前端 未结 10 1159
梦毁少年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:33

    For example when you want add entry point that can call from outside a class or assembly you should set public but if it is not importatnt use private.

提交回复
热议问题