viibrief contentsPART 1 PREPARING FOR THE JOURNEY.......................................11■The changing face of C# development 32■Core foundations: building on C# 1 27PART 2 C# 2: SOLVING THE ISSUES OF C# 1 ............................ 553■Parameterized typing with generics 574■Saying nothing with nullable types 1035■Fast-tracked delegates 1306■Implementing iterators the easy way 1567■Concluding C# 2: the final features 179PART 3 C# 3: REVOLUTIONIZING HOW WE CODE.................... 2018■Cutting fluff with a smart compiler 2039■Lambda expressions and expression trees 22710■Extension methods 256 11■Query expressions and LINQ to Objects 279 12■LINQ beyond collections 321viiiPART 4 C# 4: PLAYING NICELY WITH OTHERS......................... 36313■Minor changes to simplify code 365 14■Dynamic binding in a static language 401 15■Letting your code speak more clearly with Code Contracts 452 16■Whither now? 490ixcontentsforeword xix preface xxi acknowledgments xxiii about this book xxvPART 1 PREPARING FOR THE JOURNEY ..............................11 The changing face of C# development31.1 Starting with a simple data type 4The Product type in C# 1 4■ Strongly typed collections in C# 2 6■ Automatically implemented properties in C# 3 7 Named arguments in C# 4 71.2 Sorting and filtering 9Sorting products by name 9■ Querying collections 121.3 Handling an absence of data 14Representing an unknown price 14■ Optional parameters and default values 151.4 Introducing LINQ 16Query expressions and in-process queries 16■ Querying XML 17■ LINQ to SQL 18x1.5 COM and dynamic typing 19 Simplifying COM interoperability 19■ Interoperating with a dynamic language 201.6 Dissecting the .NET platform 21 C#, the language 22■ Runtime 22■ F...