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)
Showing posts with label What type of return types can Main have?. Show all posts
Showing posts with label What type of return types can Main have?. Show all posts
Tuesday, February 23, 2010
Subscribe to:
Posts (Atom)