Hour 5. Creating Enumerated Types and Structures

In the last few hours, you have been introduced to the basics of how types in C# work, including the predefined types and nullable types, and how classes in C# provide language syntax for object-oriented programming. You have also seen how classes enable you to create your own types to represent real-world data. There are still two classifications of value types in C# that we have not talked about: the enumerated type and the structure.

While classes are the primary mechanism you use to create new types, they do not provide a way to create types that are restricted in value ...

Get Sams Teach Yourself Visual C#® 2010 in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.