Chapter 7. Types


In C# all code belongs to a type. Normally we represent types as classes, but types can also be structures, enumerations, interfaces, etc. Because every code belongs in a type, a number of tasks relating to types are important to understand when writing applications. These tasks include being able to compare variables , being able to determine if an object is compatible with a certain type, and being able to convert from one type to another.

Beyond basic comparisons of variables to types and learning mechanisms for casting from one type to another, this chapter will also give you information for redefining cast operators. Cast operators let you define conversion rules for your classes.



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