Murach's C# 2008 How to work with interfaces and generics
Although a C# class can inherit only one class, it can implement
one or more interfaces. So in this chapter, you'll learn how
to create and implement a C# interface. You'll also learn
how to use generics so you can code your own collections that
work like the typed collections from the .NET Framework presented
in chapter 8. Along the way, you’ll learn how to work with
the generic interfaces that are used with generic collections.
|
|
|
|
An introduction to interfaces |
450 |
|
Some of the interfaces defined by the
.NET Framework |
452 |
|
How to create an interface |
454 |
|
How to implement an interface |
456 |
|
A Product class that implements the
ICloneable interface |
458 |
|
How to use an interface as a parameter |
460 |
|
|
How to code a class that defines
a generic collection |
462 |
|
Some of the generic interfaces
defined by the .NET Framework |
466 |
|
How to implement the IComparable<>
interface |
468 |
|
How to use constraints |
470 |
|
How to implement the IEnumerable<>
interface |
472 |
|
How to code an interface that uses generics |
474 |
|
 |
|
|
|
|
© Copyright 1998-2008 Mike Murach &
Associates, Inc. All rights reserved.
|