Tuesday, November 17, 2009

.NET 4 - Whats new?

.NET 4 contains new functionality and improvements throughout the framework.

1. Code Contracts
System.Diagnostics.Contracts provides a language-agnostic way to express coding assumptions in .NET programs


2. Parallel Extensions
The Parallel Computing Platform team worked with us to add the Task Parallel Library (TPL), Coordination Data Structures, and Parallel LINQ (PLINQ) to the BCL in .NET 4.

3. BigInteger
System.Numerics.BigInteger is an arbitrary-precision integer data type.

4.Variance annotations
C# and VB now support safe co- and contra-variance for generic interface and delegate types.

5.Tuples (new in Beta 1)
We’ve added common Tuple types in the BCL to facilitate language interoperability and to reduce duplication in the framework.

6.SortedSet
We’ve added a SortedSet collection along with a new ISet interface. SortedSet uses a self-balancing tree which maintains data in sorted order for performance guarantees with insertion, deletion, and searches. Both the new SortedSet and the existing HashSet implement ISet.


7.File System Enumeration Improvements
System.IO.Directory and System.IO.DirectoryInfo have new APIs for enumerating the file system that return IEnumerables instead of arrays.

8.MemoryMappedFiles
System.IO.MemoryMappedFiles exposes the memory mapping functionality provided by Windows as first-class managed APIs.

9.Registry Improvements


10 Globalization data updated to Unicode 5.1 and ResourceManager Improvements