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)
Covers topics on the Microsoft Certification Exam for the .NET Framework (Exam 70-536, Microsoft .NET Framework - Application Development Foundation)
Tuesday, March 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment