Export (0) Print
Expand All
25 out of 40 rated this helpful - Rate this topic


The Main method is the entry point of your program, where the program control starts and ends. It is declared inside a class or struct. It must be static. It can either have a void or int return type. The Main method is where you create objects and invoke other methods. The Main method can be declared without parameters or with parameters. The latter form allows your program to read command-line arguments.

See the following topics for more information and examples on using the Main method:

See Also

C# Language Features

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.