Conclusion

 <  Day Day Up  >  

Inheritance is a powerful way of expressing the relationships between types and reusing code across multiple types. The .NET Framework class libraries make extensive use of inheritance, and understanding inheritance is essential to understanding those libraries. Overridable methods and abstract methods provide a way for derived classes to specialize the behavior of their base classes. In the next chapter, we will discuss another way of reusing code across types: interfaces.

Here are some style points to keep in mind.

  • The Object type combines the capabilities that used to be split between the Object type and the Variant type in previous versions of Visual Basic.

  • Unless code is particularly performance sensitive and doing a lot of unboxing, CType is more general than DirectCast and is preferred.

 <  Day Day Up  >  


The Visual Basic .NET Programming Language
The Visual Basic .NET Programming Language
ISBN: 0321169514
EAN: 2147483647
Year: 2004
Pages: 173
Authors: Paul Vick

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