October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can use initializers to reduce the amount of work it takes to create a new instance of a class. For example, assume that you have a class that looks like Listing 20.2 (in C#) or like Listing 20.3 (in VB.NET).
Listing 20.2. LanguageChanges\App_Code\Product.cs

Listing 20.3. LanguageChanges\App_Code\Product.vb


The Product class has three public properties (declared by taking advantage of automatic properties in the ...