#1 – What the Main() Signature Looks Like

The standard entry point for a C# program is a static function named Main().  It typically looks like this:

static void Main(string[] args)

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

5 Responses to #1 – What the Main() Signature Looks Like

  1. msuworld says:

    I am leaving comment after reading your every blog..hope you won’t mind …

  2. Pingback: #707 – More Than One Class in A Program Can Contain A Main Method « 2,000 Things You Should Know About C#

  3. Satish says:

    I’m afraid you forgot to mention about the 1-dimensional array of string also as argument to the Main().
    static void Main(string[] args)

  4. drysart says:

    Main can also return an int instead of a void. The value returned will become the exit code of the process.

  5. Reblogged this on computerGuyCJ's Blog and commented:
    For anyone who is a C# programmer, or wants to be a C# programmer, or was a C# programmer and needs a refresher, this is the best reference I have ever read. Sean is practical, succinct, and humorous.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: