top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

differences between static, public and void in C#?

+2 votes
383 views
differences between static, public and void in C#?
posted Apr 9, 2017 by Madhavi Kumari

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Public :The keyword public is an access modifier that tells the C# compiler that the Main method is accessible by anyone.

Static :The keyword static declares that the Main method is a global one and can be called without creating an instance of the class. The compiler stores the address of the method as the entry point and uses this information to begin execution before any objects are created.

Void : The keyword void is a type modifier that states that the Main method does not return any value.

answer Apr 10, 2017 by Manikandan J
...