The following typographic conventions are used in this book:
Italic is used for definitions of technical terms, URLs, filenames, directory names, and pathnames.
Constant width
is used for code samples, statements, namespaces, classes, assemblies, interface directives, operators, attributes, and reserved words.
Bold constant width
is used for emphasis in code samples.
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 statement and throws an exception when the statement is false.
This book follows the recommended naming guidelines and coding style presented in Appendix E. Whenever it deviates from that standard, it is likely the result of space or line-length constraints. With respect to 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 the first word of the name is not capitalized. I prefix private member variables with an m_
:
public class SomeClass { privatt m_Number; public int Number {get;set}; }
I use ellipses between curly braces to indicate the presence of code that is necessary but unspecified:
public class SomeClass {...}
In the interests of clarity and space conservation, code examples often don’t 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.