The following typographic conventions are used in this book:
Used for technical terms, URLs, addresses, filenames, and file extensions.
Constant width
Used for code samples, statements, namespaces, classes, assemblies, interface directives, operators, attributes, and reserved words.
Constant width
bold
Used for emphasis in code samples.
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
Whenever I wish to make a point in a code sample, I do so with the
static Assert
method of the Debug
class:
int number = 1+2; Debug.Assert(number == 3);
The Assert
method accepts a
Boolean value and throws an exception when it is false
.
The book follows the recommended naming guidelines and coding
style available at http://www.idesign.net.
Whenever it deviates from that standard, it is likely the result of
space or line-length constraints. As for naming conventions, I use
“Pascal casing” for public member methods and properties; this means the
first letter of each word in the name is capitalized. For local
variables and method parameters, I use “camel casing,” in which the
first letter of each word in the name is capitalized, with the exception
of the first word. The names of private member variables are prefixed
with m_
:
class SomeClass { int m_Number; public int Number {get;set}; }
I use ellipses between curly braces to indicate the presence of code that is necessary but unspecified:
class SomeClass {...}
In the interest of clarity and space, code examples often do not
contain all the using
statements
needed to specify all the namespaces the examples require; instead, such
examples include only the new namespaces introduced in the preceding
text.
18.191.240.222