Tutorials
Microsoft AJAX
Microsoft AJAX Library - C# and JavaScript Classes
Production-quality C# implementationFor the purpose of demonstrating a few more OOP-related concepts, we'll use another class. Our new class is named Table, and it has two public fields (rows, columns), and one method, getCellCount(). The getCellCount() method should return the number of rows multiplied by the number of columns. The class constructor should receive two parameters, used to initialize the rows and columns fields. This class could be represented by the class diagram in Figure 3-3.

Figure 3-3. Class diagram representing the Table class
The C# version of this class would look like this:
You'd instantiate and use the class like this:
Next Page: Production-quality C# implementation