3.1. The Basics About Classes

As a developer you've probably already created classes or at least heard about them. Classes are the code definitions for objects. The nice thing about a class is that you can use it to create as many objects as you need. For example, you might have a class that represents an XML file, which can be used to read some data. If you want to access multiple XML files at once, you can create several instances of your class, as shown in Figure 3-1. These instances are called objects.

Figure 3.1. Classes are used to create objects.

Classes interact with each other with the help of three key ingredients:

  • Properties: Properties ...

Get Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.