The if Statement

 

Multiple-Dimension Arrays

You will continuously use two-dimensional string arrays. However, because they are jagged, they are never reusable. Anytime you alter a string array you must create a new copy of that string. This constant recreation of variables using the new designation (which creates a new instance of the basic object) is necessary in object-oriented programming, and it also creates a large number of code snippets whose usefulness exists for only a few fleeting milliseconds . Thus, it was necessary to invent a garbage collection scheme and get this superseded code out of the project (primarily to save space in memory). The garbage collection scheme is implemented in each FormX.Designer.cs file:

 // Clean up any resources being used. protected override void Dispose(bool disposing) {   if (disposing && (components != null))   {     components.Dispose();   }   base.Dispose(disposing); } 

Sometimes programmers condense this sequence into:

 protected override void Dispose(bool disposing) { if (disposing && (components != null)) components.Dispose();   base.Dispose(disposing); } 

because old programmers still think in terms of assembler programming where every line was valuable , and they never wasted space.

 


Unlocking Microsoft C# V 2.0 Programming Secrets
Unlocking Microsoft C# V 2.0 Programming Secrets (Wordware Applications Library)
ISBN: 1556220979
EAN: 2147483647
Year: 2005
Pages: 129

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