O'Reilly logo

A Programmer's Guide to C# 5.0, 4th Edition by Nick Wienholt, Eric Gunnerson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 31

image

Other Language Details

This chapter deals with some miscellaneous details about the language, including how to use the Main() function, how the preprocessor works, and how to write literal values.

The Main Function

The simplest version of the Main() function should already be familiar from earlier in the book.

using System;class Test{    public static void Main()    {       Console.WriteLine("Hello, Universe!");    }}

Returning an Int Status

It may sometimes be useful to return a status from the Main() function, particularly if the program is called programmatically, because the return status can be used to determine whether the application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required