Skip to Main Content
Pro C# 2010 and the .NET 4 Platform, Fifth Edition
book

Pro C# 2010 and the .NET 4 Platform, Fifth Edition

by Andrew Troelsen
May 2010
Intermediate to advanced content levelIntermediate to advanced
1752 pages
41h 17m
English
Apress
Content preview from Pro C# 2010 and the .NET 4 Platform, Fifth Edition

10.2. The Role of Generic Type Parameters

You can find generic classes, interfaces, structures, and delegates sprinkled throughout the .NET base class libraries, and these might be part of any .NET namespace.

NOTE

Only classes, structures, interfaces, and delegates can be written generically; enum types cannot.

When you see a generic item listed in the .NET Framework 4.0 SDK documentation or the Visual Studio 2010 object browser, you will notice a pair of angled brackets with a letter or other token sandwiched within. Figure 10-1 shows a number of generic items in the System.Collections.Generic namespace, including the highlighted List<T> class.

Figure 10.1. Generic Items Supporting Type Parameters

Formally speaking, you call these tokens ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner
Visual C++ 2008: How to Program, Second Edition

Visual C++ 2008: How to Program, Second Edition

P. J. Deitel, H. M. Deitel, D. T. Quirk

Publisher Resources

ISBN: 9781430225492Purchase book