August 2013
Beginner
540 pages
12h 51m
English
After completing this chapter, you will be able to:
Distinguish between reference and value types.
Work with structures.
Work with enumerations.
In preceding chapters, you learned about object-oriented programming and how to apply it within the Microsoft .NET Framework. You’ve seen how many data types within .NET are represented by classes, and you’ve learned how to create and use your own classes. However, not every data type in .NET is a class, and now you’re going to meet the other fundamental building block of .NET types—the value type.
In this chapter, you’ll discover what value types are and how they differ from the reference types you’ve already met. You will also learn about two important value types, structures and enumerations, ...