Chapter 8. Cutting fluff with a smart compiler
This chapter covers
Automatically implemented properties
Implicitly typed local variables
Object and collection initializers
Implicitly typed arrays
Anonymous types
We start looking at C# 3 in the same way that we finished looking at C# 2—with a collection of relatively simple features. These are just the first small steps on the path to LINQ, however. Each of them can be used outside that context, but they’re all pretty important for simplifying code to the extent that LINQ requires in order to be effective.
One important point to note is that while two of the biggest features of C# 2—generics and nullable types—required CLR changes, there are no significant changes to the CLR that ships with .NET 3.5. ...
Get C# in Depth now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.