:: 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 (1443)
 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 ?    76 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
Does C# support multiple inheritance? Visual-Soft 3
Can multiple catch blocks be executed?   4
What is overloading and how can this be done ? MMTS 4
which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five chars.but next row it have 100 chars.   3
can we create an empty interface with no definitions? If so, how it should be called in the class? IBM 3
how to handle errors in sqlserver   1
what is the difference between int and Int32? TCS 5
what is Diff Gram HCL 2
Wats the diff between sealed class and private class in inheritance iSoft 7
What?s an abstract class? NIIT 4
What?s the .NET datatype that allows the retrieval of data by a unique key? Smartdata 2
What are properties and indexer? TCS 3
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.   ::