There’s over 250 new features in .NET 3.5 and Visual Studio 2008. Here’s a list of new BCL features available in .NET 3.5:
A new date time data structure that can specify an exact point in time relative to the UTC time zone. DateTimeOffset is made up of a DateTime and offset. It includes most of the functionality of the current DateTime and allows seamless conversion to DateTime. In addition, SQL Server 2008 adds full support for DateTimeOffset as a new column data type. DateTimeOffset is the new preferred type to use for most date time scenarios. For more guidance on when to use DateTime vs. DateTimeOffset refer to my blog post introducing DateTimeOffset.
Comprehensive time zone support. Previously the .NET Framework only supported conversions between Local and UTC times. TimeZoneInfo enables enumeration of all the time zones supported by the operating system, conversion of date times from one time zone to another, and serialization of time zones across machines. This support includes cases where the Daylight Saving Time (DST) rules can change from one year to the next, such as the recent 2007 DST change in North America, and will do historically accurate conversions across these changes. Support is also provided for detecting invalid or ambiguous times caused by Daylight Saving Time, and creating custom time zones. See Kathy’s TimeZoneOffset Starter Guide (Note: TimeZoneInfo was previously called TimeZone2). Also check out Josh Free’s blog post on Exploring Windows Time Zones with TimeZoneInfo and Working with Ambiguous and Invalid Points in Time.
A high-performance set collection. HashSet is an unordered collection that contains unique elements. In addition to the standard collection operations, HashSet provides standard set operations such as union, intersection, and symmetric difference. See Kim Hamilton’s original blog post introducing HashSet.
Support for anonymous and named pipes. Pipes can be used to achieve inter-process communication (IPC) between any process running on the same machine, or on any other windows machine within a network. Anyone familiar with streams should be comfortable using these new APIs to achieve IPC. See my original blog post introducing Pipes.
EventSchemaTraceListener is highly tuned for logging performance. Similar to the XMLWriterTraceListender, this trace listener logs XML to disk. In particular, this type logs in the event schema, which is shared by some other new technologies. This tracelistener has performance which is drastically improved over previous logging tracelisteners, especially on machines with multiple processors. Additionally, this is the first trace listener which allows many different disk logging options, such as circular logging across multiple files. See Inbar Gazit’s blog post on EventSchemaTraceListener for more info.
Better integration with Event Tracing for Windows (ETW), including an ETW provider and ETW trace listener APIs.
A lightweight reader/writer lock class. ReaderWriterLockSlim supports basic read and write locks, allowing for better scalability for read-only concurrent worker scenarios. As its name implies, this lock performs anywhere from 2x to 5x better than the existing ReaderWriterLock class, and scales better on multi-processor and multi-core machines. This type also supports upgradeable-read support: if code needs to inspect some state before deciding to acquire the write-lock, upgradeable-reads allow concurrency-safe reading with an optional deadlock-free upgrade to write. Recursion is also disabled by default, helping to write correct code, with an optional recursive mode turned on at lock instantiation time.
Support for the “Suite B” set of cryptographic algorithms, as specified by the National Security Agency (NSA). Cryptography developers can now use the FIPS-certified implementations of advanced SHA hashing algorithms and AES encryption algorithm in managed code. These classes follow the same familiar patterns as the existing cryptography algorithms, making it easy for developers to use the new classes right away. Check out Shawn Farkas’ blog post on the New Crypto Algorithms in .NET 3.5.
A new add-in hosting model that makes it easy for managed applications to host add-ins (i.e. plug-ins, add-ons, extensions, etc.) with support for Discovery, Activation, Isolation, Unloadability, Sandboxing, and Lifetime management of add-ins. This is an exciting new feature that makes it easy to create add-ins for your managed applications without having to deal with all the associated isolation and security plumbing yourself. The CLR Add-In Team Blog has a lot more information on the new add-in model.
Also, be sure to check out Jack Gudenkauf’s blog on What’s new in the .Net Framework 3.5. He mentions some additional new CLR features (GC, Security, and ThreadPool) that you may find interesting.