Chapter 6. Special Members


Chapter 6. Special Members

At this point, if you have been reading the book sequentially, you probably know the basics of writing classes ”how to define a class, and how to add members such as fields and functions to a class. In the last chapter you also learned how to build one class by inheriting code from another class.

Aside from the basic members that you can add to a class, there are a few members that fall into the "special members" category. These are members that add functionality beyond what a basic member provides. For example, there are functions known as constructors that can trigger automatically when you create an instance of the class. There are also function definitions that enable the user of the class to pass a variable number of parameters. These special members are discussed in this chapter.

One more thing before we get started. Every chapter in this book has a sample application you build for the chapter. However, this chapter doesn't create a whole application. Rather, for this chapter you're going to write a single class at the end that will be useful in writing Web applications and will illustrate a lot of the principles in the chapter.



C#
C# & VB.NET Conversion Pocket Reference
ISBN: 0596003196
EAN: 2147483647
Year: 2003
Pages: 198
Authors: Jose Mojica

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net