:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Microsoft Related >> C Sharp


 Visual Basic interview questions  Visual Basic Interview Questions (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1444)
 VB.NET interview questions  VB.NET Interview Questions (150)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (33)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
what does  static void Main(string[] args) in C# mean????????
 Question Submitted By :: C-Sharp
I also faced this Question!!     Answer Posted By  
# 1
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

.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

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

.net Runtime-->

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 ?    78 Yes 7 No
# 2
It is the code starting point and when a function specified with static it will be always available in App Domain (in application). Also no need to create any instance and Classname.Function / Method name will work. The usage of string args[] is read the command line argument. 
Is This Answer Correct ?    23 Yes 3 No
# 3
in C# Main function returns something as string. If u dont
want something return to function u have to use Void. And
Static Keyword shows that there should be something in the
function which is static, i.e. WriteLine() is a static
member method of the Console class.
Is This Answer Correct ?    39 Yes 44 No
Vaibhav Durhaya

Other C Sharp Interview Questions
  Question Asked @ Answers
why we can't create an object for a static class?? what is the reason behind this? HCL 4
Can you allow class to be inherited, but prevent the method from being over-ridden? Mind-Tree 2
What is difference between Convert.ToString(variable) and variable.ToString() Mascon 4
1.write a program in C# to find a given point which is inside in a circle. Given circle's radius and its center point? 2.Write a program in C# to generated 20 prime numbers greater than a given number? (It should be more efficient for large numbers also) 3. Write a Code to check whether a given point is inside a circle or not? given Circle's raduis and its center point. 4. using oops concept, design an elevator do not forget buttons on each floor..   2
wt is namespace? wt is the use?   12
how can i display crystal report in button_click? am working with VS2005..........plz help me   1
how to return morethan one value using out parameter in ; For Example : public int show(out int []a) { int []a={1,2,3,4,5}; return a[]; } we have to print all the values without using the Console.WriteLine statement; Verizon 1
I have a class declared as below public class a { public void add() {} } What is the diference between a a1 =new a; and simply a a1;   3
What is difference between value and reference types ? Accenture 4
difference between managed code and unmanaged code ?   2
What?s the advantage of using System.Text.StringBuilder over System.String?   1
What is the difference between class and abstract class?   9
For more C Sharp Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::