Google


   


You are here: CodeIdol.com > C# > Essential C# 2.0 > Inheritance

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

Essential C# 2.0



Chapter 6. Inheritance The last chapter discussed association relationships, how one class can reference another class or set of classes using fields or properties. This chapter looks at another relationship between classes, that of inherita...



Derivation It is reasonably common to want to extend a given type to add functionality, such as behavior and data. The purpose of inheritance is to do exactly that. Given a Person class, you create an Employee class that additionally contains Em...

read more: Derivation


Overriding the Base Class All public and protected members of a base class are inherited in the derived class. However, sometimes the base class does not have the optimal implementation of a particular member. Consider the Name property on PdaItem...



Abstract Classes Many of the inheritance examples so far have defined a class called PdaItem that defines the methods and properties common to Contact, Appointment, and so on, which are type objects that derive from PdaItem. PdaItem is not inten...

read more: Abstract Classes


Everything Ultimately Derives from System.Object Given any object, whether a custom class or one built into the system, the methods shown in Table 6.2 will be defined. Table 6.2. Members of System.ObjectMethod NameDescriptionpublic virtual bool E...



Verifying the Underlying Type with the is Operator Because C# allows casting down the inheritance chain, it is sometimes desirable to determine what the underlying type is before attempting a conversion. Also, checking the type may be necessary fo...



Conversion Using the as Operator The advantage of the is operator is that it enables verification that a data item is of a particular type. The as operator goes one step further. It attempts a conversion to a particular data type just like a cast ...



Summary This chapter discussed how to specialize a class by deriving from it and adding additional methods and properties. This included a discussion of the private and protected access modifiers that control the level of encapsulation. This chap...

read more: Summary

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

You are here: CodeIdol.com > C# > Essential C# 2.0 > Inheritance


ADBRITE ads links
   
Related tags







Popular Categories
Unix books and guides

AJAX popular information
C# language guides
Windows books and cookbooks

.......








Business Key Top Sites

be number one
rate your site


Mac Mini в Z-Store от 28490 руб - mac mini. Сделай компьютер удобным.

    С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.

    Русский Polski Francais Deutsch
    support sitemap terms

© CodeIdol Labs, 2007 - 2009