•
CONTENTS
Implicit
Numeric
Conversions
...............................................................................................................
397
Overflow
Checking
Context
..................................................................................................................
398
Explicit
Numeric
Conversions
...............................................................................................................
400
Reference
Conversions
..................................................................................................
404
Implicit
Reference
Conversions
............................................................................................................
405
Explicit
Reference
Conversions
............................................................................................................
407
Valid
Explicit
Reference
Conversions
...................................................................................................
408
Boxing
Conversions
.......................................................................................................
409
Boxing
Creates
a
Copy
..........................................................................................................................
410
The
Boxing
Conversions
.......................................................................................................................
411
Unboxing
Conversions
...................................................................................................
411
The
Unboxing
Conversions
...................................................................................................................
412
User-Defined
Conversions
.............................................................................................
413
Constraints
on
User-Defined
Conversions
............................................................................................
413
Example
of
a
User-Defined
Conversion
................................................................................................
414
Evaluating
User-Defined
Conversions
..................................................................................................
416
Example
of
a
Multistep
User-Defined
Conversion
................................................................................
416
The
is
Operator
..............................................................................................................
418
The
as
Operator
.............................................................................................................
419
•
Chapter
17:
Generics
..........................................................................................
421
What
Are
Generics?
.......................................................................................................
422
A
Stack
Example
...................................................................................................................................
422
Generics
in
C#
................................................................................................................
424
Continuing
with
the
Stack
Example
......................................................................................................
425
Generic
Classes
.............................................................................................................
426
Declaring
a
Generic
Class
..............................................................................................
427
Creating
a
Constructed
Type
.........................................................................................
428
xix