Abstract
In this chapter, we have looked at three categories of C# type: the interface, the struct, and the enum. Most C# programmers spend most of their time working on classes, but these types have their place and can be very useful in certain circumstances: interfaces are useful when you want to impose consistency on classes and structs that are not otherwise related, structs are useful when you want to create custom value types, and enums are useful when you need to work with a fixed range of values.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Adam Freeman
About this chapter
Cite this chapter
Freeman, A. (2010). Interfaces, Structs, and Enums. In: Introducing Visual C# 2010. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-3172-1_12
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3172-1_12
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-3171-4
Online ISBN: 978-1-4302-3172-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)