Summary


This chapter examined C# syntax for declaring and manipulating objects. You have seen how to declare static and instance fields, properties, methods, and constructors. You have also seen that C# adds some new features not present in the OOP model of some other languages: static constructors provide a means of initializing static fields, whereas structs allow you to define high-performance types, albeit with a more restricted feature set, which do not require the use of the managed heap. You have also seen how all types in C# derive ultimately from the type System.Object, which means that all types start with a basic set of useful methods, including ToString().

Chapter 4, “Inheritance,” examines implementation and interface inheritance in C#.




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

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