- Overview of Classes
- Programs and Classes: A Quick Example
- Declaring a Class
- Class Members
- Creating Variables and Instances of a Class
- Allocating Memory for the Data
- Instance Members
- Access Modifiers
- Accessing Members from Inside the Class
- Accessing Members from Outside the Class
- Putting It All Together
In the previous chapter, you saw that C# provides six user-defined types. The most important of these, and the one I’ll cover first, is the class. Since the topic of classes in C# is a large one, I’ll spread its discussion over the next several chapters.
Before the days of object-oriented analysis and design, programmers thought of a program as just ...