Skip to main content

Interfaces, Structs, and Enums

  • Chapter
Introducing Visual C# 2010
  • 1687 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics