Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what does static void Main(string[] args) in C# mean????????

Answer Posted / subhash

This can be explained as below

public : since the method will be accessed by the other
classes(.net runtime). That is why access modifier is Public

Static:
.net runtime environment call static method of the class
where main is defined. By making Main method as static .net
runtime environment do not need to make object of the class.
runtime environment call the method something like as stated
below.

Class A
{
A()
{}
public static void Main(string[] agrs)
{
}
}

.net Runtime-->
A.Main(args)

Void :
Main method does not return anything

(string[] args):
Here we can pass any number of parameter to the class.
lets say we are making an exe taking 2 parameters then we
can pass parameters to the main method

Is This Answer Correct ?    89 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's c# ?

937


What is class in oops with example in c#?

855


What are the two kinds of properties in c#.

885


What is jit? What are the different types of jit?

944


i want o/p 011242110 in c# code.

2010


Why we use get set in c#?

868


What happens if a static constructor throws an exception?

885


What is the use of command builder?

963


What is difference between list and dictionary in c#?

814


What is dll file in c#?

916


How are Windows programs different from normal C-programs?

2135


In c#, what will happen if you do not explicitly provide a constructor for a class?

905


What is event and delegates in c#?

932


Should I use double or float?

849


Why do we need reflection in c#?

864