CONTENTS
Importing Extension Methods............................................................................................................... 421
The IntelliSense of Extension Methods................................................................................................. 421
Extending Types Implementing Specific Interfaces.............................................................................. 422
Understanding Anonymous Types .................................................................................423
Defining an Anonymous Type ............................................................................................................... 424
The Internal Representation of Anonymous Types ............................................................................... 425
The Implementation of ToString() and GetHashCode().......................................................................... 426
The Semantics of Equality for Anonymous Types................................................................................. 427
Anonymous Types Containing Anonymous Types ................................................................................ 429
Working with Pointer Types...........................................................................................429
The unsafe Keyword............................................................................................................................. 431
Working with the * and & Operators..................................................................................................... 433
An Unsafe (and Safe) Swap Function ................................................................................................... 434
Field Access via Pointers (the -> Operator).......................................................................................... 435
The stackalloc Keyword ....................................................................................................................... 435
Pinning a Type via the fixed Keyword................................................................................................... 436
The sizeof Keyword .............................................................................................................................. 437
Summary .......................................................................................................................438
Chapter 12: LINQ to Objects ................................................................................439
LINQ-Specific Programming Constructs ........................................................................439
Implicit Typing of Local Variables......................................................................................................... 440
Object and Collection Initialization Syntax............................................................................................ 441
Lambda Expressions............................................................................................................................. 441
Extension Methods ............................................................................................................................... 442
Anonymous Types ................................................................................................................................ 443
Understanding the Role of LINQ.....................................................................................443
LINQ Expression 2&R7G&