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 / basha

In C# language CLR (common language run time) compiler program Execute from Main() method only In this declare static keyword we can't create instance to that method (or) class.
Example:

class A // step 3: class A is declare
{
public void Main()//step 4: In class A have contain a method Main. In this method contain print some text
{
Console.WriteLine("main method call");// step 5: by call main method to print this text.
}
}

class B
{
public static void Main() //step 1: Execute program form this
{
A obj = new A();// step 2: after compiler check here what is A? here A is class creating object to class A.

obj.Main(); // step 6:print text from Main() method in class A
}

}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is tochararray in c#?

1022


How do you prevent a method from being overridden in c#?

915


What are managed providers?

1061


What is the difference between console and windows application?

1022


What is namespace in oop?

980


Is stringbuilder thread safe c#?

934


What is a .exe extension files? How is it similar to .dll extension files?

1108


What is strong data type in c#?

928


What are Namespaces?

1410


What is gridview c#?

956


What is assembly version series sequence?

1039


What does exclamation mark mean c#?

1063


Explain manifest in c#.

992


How to find Percentage, name ,College from a resume or document ? How to export these values to other page in C#?

973


Can constructor be overloaded in c#?

913