Do you need static void main in C#?

Main is declared inside a class or struct. Main must be static and it need not be public . … The enclosing class or struct is not required to be static. Main can either have a void , int , or, starting with C# 7.1, Task , or Task<int> return type.

Sizin İçin Seçtik  What is public static Main in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *