Covers topics on the Microsoft Certification Exam for the .NET Framework (Exam 70-536, Microsoft .NET Framework - Application Development Foundation)

Tuesday, March 25, 2008

What type of return types can Main have?

In C#, Main can return a void type and an int type. Returning a void type is perhaps the most commonly used return type for main, but returning an integer value from main is also useful when other applications will be running your application, such as being run by a batch file. The integer value returned from an int main method will be stored in the environment variable %ERRORLEVEL%

Additional Resources
Main() Return Values in C# (Microsoft)

No comments:

Support This Site

LinkShare  Referral  Prg