Can we have two main methods in c#?



Can we have two main methods in c#?..

Answer / Chaman Lal Singh

No, a C# program can only have one entry point, which is typically defined as the Main method. If there are multiple Main methods in a single file, the compiler will generate an error.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Can we override interface methods in c#?

1 Answers  


What is a static property. Give an example?

1 Answers  


State two different types of access modifiers.

1 Answers  


i have a table named login in mysql database containing (empid,fname,lname,mobno,emailid,usrname,usrpwd) i have 2 textboxes in which i enter my username and pwd..so based on what is entered in those textboxes it should retreive all other details of dat username in the remaining 6 textboxes..i want the code for this...

1 Answers   Royal Enfield,


Which constructor is called first in c#?

1 Answers  


What statements can enclose a "continue" statement?

3 Answers   Fortech,


What are jagged arrays used for?

1 Answers  


How Is The Dll Hell Problem Solved In .net?

1 Answers   Siebel Systems,


What is an Interface in C#?

1 Answers   TryTechnicals Pvt Ltd,


How do you escape in c#?

1 Answers  


What is marshalling in c#?

1 Answers  


What are the properties of c#?

1 Answers  


Categories