NETFx 3.5 · Foundations for fluent C#
The early LINQ era brought query syntax, type inference, and concise object shaping into everyday C#.
Implicitly typed locals (`var`)
C# 3.0 NETFx 3.5
Use var for obvious local types and anonymous types while keeping compile-time static typing.
Anonymous types
C# 3.0 NETFx 3.5
Anonymous types let you create lightweight objects on the fly with new { property = value } syntax. The compiler generates a class for you with equality and ToString() built in.
Auto-implemented properties
C# 3.0 NETFx 3.5
Auto-implemented properties let you declare a property with just { get; set; }, letting the compiler generate the backing field for you. They cut property boilerplate while keeping your intent crystal clear.
Extension methods
C# 3.0 NETFx 3.5
Extension methods let you add discoverable helpers to existing types, which is why they show up everywhere from LINQ to application-specific fluent APIs.
Func<T> and Action<T>
C# 3.0 NETFx 3.5
Use built-in generic delegate types to pass behavior without defining one-off delegate types.
Lambda expressions
C# 3.0 NETFx 3.5
Lambda expressions make delegate-based code shorter and easier to scan, especially when you pass behavior into LINQ, events, and async APIs.
LINQ
C# 3.0 NETFx 3.5
LINQ gives C# a consistent way to filter, transform, group, and sort data with either query syntax or fluent method syntax.
Object and collection initializers
C# 3.0 NETFx 3.5
Object and collection initializers let you populate properties and collection elements inline at construction time. Instead of creating an object and then setting properties separately, you do it all in one readable expression.