top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between public, static and void?

+2 votes
420 views

Hai,friends if you are know the difference means tell me

posted Nov 12, 2014 by Vinitha

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 Nov 12, 2014 by Manikandan J
...