O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

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

Conventions Used in This Book

The following typographical conventions are used in this book.

Italic is used for:

  • Directory pathnames and filenames

  • Domain names and URLs

  • New terms where they are first defined

Constant width is used for:

  • Code examples and output

  • Names and keywords in C# programs, including method or field names, variable names, and class names

  • XML and HTML element tags

  • Registry keys

Constant width italic is used for:

  • Replaceable parameter names or user-provided elements in syntax

In several parts of this book, we have included simple grammar specifications for many, but not all, of the language constructs introduced in this book, to provide you with a fast way to understand the grammar of a particular construct and its valid combinations. In this grammar syntax, the XML occurrence operators (?, *, and +) are used to specify more precisely the number of times an element may occur in a particular construct:

x

Indicates x is to be used verbatim (constant width)

x

Indicates x is supplied by the programmer (constant width italic)

x?

Indicates x may occur zero or one times.

x*

Indicates x may occur zero or more times, separated by commas.

x+

Indicates x may occur one or more times, separated by commas.

[...]

Indicates a logical grouping of code elements, when not implicitly grouped using the verbatim terms {}, (), and [].

[x|y]

Indicates only one of a choice of code elements may occur.

Tip

This icon designates a note, which is an important aside to the nearby text.

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