top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

differences between static, public and void in C#?

+2 votes
118 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...