Conventions


If you have decided to take the plunge with this book, I'd like to thank you for your faith and express my hope that I live up to it. To aid you in reading the text, I want to let you in on some conventions I use in my writing.

First and foremost, the wonderful thing about WinForms is how visual it is, and that's why I use a lot of figures to illustrate its features. Some of those pictures really need to be in color to make the point, so be sure to check the color pages at the center of this book for those color plates.

As useful as figures are, I think primarily in code. Code is shown in monospace type:

 System.Console.WriteLine("Hello, WinForms."); 

Console application activation is also shown in monospace type:

 C:\> csc.exe hello.cs 

When a part of a code snippet or a command line activation is of particular interest, I mark it in bold and often provide a comment:

  // Notice the use of the .NET System namespace   System.  Console.WriteLine("Hello, WinForms."); 

When I want to direct your attention to a piece of code even more fully, I replace superfluous code with ellipses:

 class MyForm : System.Windows.Forms.Form {  ... // fields  private void MyForm_Load        (object sender, System.ComponentModel.EventArgs e) {     MessageBox.Show("Hello from MyForm");   } } 

Furthermore, to make the printed code more readable, I often drop namespaces and protection keywords when they don't provide additional information:

  // Shortened "System.Windows.Forms.Form" base class  class MyForm : Form {   ... // fields  // Removed "private" specifier and "System.ComponentModel" namespace  void MyForm_Load(object sender, EventArgs e) {     MessageBox.Show("Hello from MyForm");   } } 

Conversely, when showing .NET attributes, I use their full name :

  [SerializableAttribute]  class MyCustomType {...} 

Some languages, such as C#, let you drop the "Attribute" suffix for convenience, but that makes it hard to pin down the details of the attribute class in the online documentation.

Also, I sometimes omit error checking from the printed code for clarity, but I try to leave it in the sample code that comes with this book.

In the prose itself, I often put a word or phrase in italics to indicate a new term that I'm about to define. As an example of this kind of term and its definition, hegemony is a preponderant influence or authority, as well as a potent business practice.

Finally, I often mention keyboard shortcuts because I find them convenient . The ones I mention are the default Visual Studio Developer key bindings. If you're not using those key bindings, you'll need to map the keyboard shortcuts to your own settings.



Windows Forms Programming in C#
Windows Forms Programming in C#
ISBN: 0321116208
EAN: 2147483647
Year: 2003
Pages: 136
Authors: Chris Sells

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net