Home
Browse all 647 examples
Download all 647 examples
Download sample chapters
Reviews
Errata
Acknowledgments
Links on .NET
Paradoxal Press
Buy directly from Paradoxal Press at $33.99 (Save 43%)
Category: Programming
Level: Beginner to seasoned
900 pages
ISBN-10 097661322-0
ISBN-13 978-097661322-0
$59.99 USA
$79.99 CANADA
|
Chapter 13:
Generics
Chapter 12< > Chapter 14
Listings: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
Table of content:
A C#1 problem and how to solve it with .NET 2 generics The problem of typing collection items with C#1 An ideal solution using C#2 generics
.NET 2 generics: the big picture Declaring several parameter types Open and closed generic types .NET generics vs. C++ templates Visibility of a generic type Generic structure and interface Aliases and generic types
Type parameter constraints
Default constructor constraint
Derivation constraint
Reference\Value type constraint
Members of generic types Method overloading Static fields Static methods Class constructor Operator overloading Nested types
Operators and generics Equality, inequality and comparison operators on parameter type instances The typeof operator and generics params and lock keywords and generics
The default operator
Casting and generics Basic rules Casting and generic arrays is and as operators
Inheritance and generics Basic rules Overriding virtual methods of generic types
Generic methods Introduction Generic methods and constraints Virtual generic methods Inference of generic method parameter types C#2 grammar ambiguity
Delegates, events and generics Introduction Generic delegates and generic methods Contravariance, covariance, delegates and generics Events and generic delegates
Reflection, attributes, IL and generics Generics and the System.Type class Generics and the System.Reflection.MethodBase and System.Reflection.MethodInfo classes Attributes and generics The IL Language and generics
Generics in the.NET 2 framework Object serialization and generics .NET Remoting and generics Collections and generics Domains which don't support generics
Index
Copyright Patrick Smacchia 2006 2007
|