O'Reilly logo

Introducing Visual C# 2010 by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Interfaces, Structs, and Enums

The previous chapters have been focused on classes, but C# supports other categories of types, three of which are the subject of this chapter: interfaces, structs, and enums.

Must C# programmers won't use these types as frequently as classes, but each of these three has its place in the programming tool set, and a working knowledge of them is useful, not least because you will find examples of each when you come to use the .NET Framework. Table 12-1 provides the summary for this chapter.

Table 12-1. Quick Problem/Solution Reference for Chapter 12

Problem

Solution

Listings

Impose consistent features on types that are otherwise unrelated.

Define and implement an interface.

12-1 through 6, 12-10, 12-11, 12-14, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required