contentsforeword xvii preface xix acknowledgments xx about this book xxiiabout the author xxviabout the cover illustration xxviiPART 1C# IN CONTEXT..................................................................1Survival of the sharpest31.1An evolving language3A helpful type system at large and small scales 4 ■ Ever more concise code 6 ■ Simple data access with LINQ9Asynchrony 10 ■ Balancing efficiency and complexity11Evolution at speed: Using minor versions121.2An evolving platform131.3An evolving community141.4An evolving book15Mixed-level coverage 16 ■ Examples using Noda Time 16Terminology choices17vii1viiiCONTENTSPART 2C# 2–5...................................................................19C# 2212.1Generics22Introduction by example: Collections before generics22Generics save the day 25 ■ What can be generic?29Type inference for type arguments to methods 30 ■ Type constraints 32 ■ The default and typeof operators34Generic type initialization and state372.2Nullable value types38Aim: Expressing an absence of information39 ■ CLR and framework support: The Nullable struct 40 ■ Language support432.3Simplified delegate creation49Method group conversions 50 ■ Anonymous methods50Delegate compatibility522.4Iterators53Introduction to iterators54 ■ Lazy execution55 ■ Evaluation of yield statements 56 ■ The importance of being lazy57Evaluation of finally blocks 58 ■ The importance of finally handling61 ■ Implementation sketch622.5Minor features66Partial types 67 ■ Static classes 69 ■ Separate getter/setter access for properties 69 ■ Namespace aliases70Pragma directives 72 ■ Fixed-size buffers73InternalsVisibleTo 73C# 3: LINQ and everything that comes with it753.1Automatically implemented properties763.2Implicit typing77Typing terminology 77 ■...