Previous Page
Next Page

Chapter 7
Creating and Managing Classes and Objects
After completing this chapter, you will be able to:

In Part I, “Introducing Microsoft Visual C# and Microsoft Visual Studio 2005,” you learned how to declare variables, use operators to create values, call methods, and write many of the statements you need when implementing a method. You now know enough to progress to the next stage—combining methods and data into your own classes.

The Microsoft .NET Framework contains thousands of classes, and you have used a number of them already, including Console and Exception. Classes provide a convenient mechanism for modeling the entities manipulated by applications. An entity can represent a specific item, such as a customer, or something more abstract, such as a transaction. Part of the design process of any system is concerned with determining the entities that are important, and then performing an analysis to see what information they need to hold and what functions they should perform. You store the information that a class holds as fields, and implement the functions of a class by using methods.

The chapters in Part II, “Understanding the C# Language,” provide you with all you need to know to create your own classes.


Previous Page
Next Page