Conventions Used in This Book
The following typographic conventions are used in this book:
- Italic
Used for technical terms, online links, and filenames
-
Constant width Used for code samples, statements, namespaces, classes, assemblies, interface directives, operators, attributes, and reserved words
-
Constant width bold Used for code emphasis
Tip
This icon designates a note, which is an important aside to the nearby text.
Warning
This icon designates a warning relating to the nearby text.
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.
The book follows the recommended naming guidelines and coding style presented in Appendix E of my book Programming .NET Components (O’Reilly). 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 the first word of the name is not capitalized. In the case of private members, I prefix such variables with m_:
public 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 ...