Diagnostics and Performance – Starting with the .NET Framework 4, you can get processor usage and memory usage estimates per application domain.
Garbage Collection – This feature replaces concurrent garbage collection in previous versions and provides better performance.
Code Contracts – Code contracts let you specify contractual information that is not represented by a method’s or type’s signature alone. The new
System.Diagnostics.Contracts namespace contains classes that provide a language-neutral way to express coding assumptions in the form of preconditions, postconditions, and object invariants.
Design-Time-Only Interop Assemblies – You no longer have to ship primary interop assemblies (PIAs) to deploy applications that interoperate with COM objects. In the .NET Framework 4, compilers can embed type information from interop assemblies, selecting only the types that an application (for example, an add-in) actually uses.
Dynamic Language Runtime – The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages. To support the DLR, the new
System.Dynamic namespace is added to the .NET Framework.
Covariance and Contra-variance – Several generic interfaces and delegates now support covariance and contra-variance.
BigInteger and Complex Numbers – The new
System.Numerics.BigInteger structure is an integer data type that can store fairly large number as it has no upper and lower bound values. Complex types represents a complex number of form a + bi. It supports arithmetic and trigonometric operations with complex numbers.
Tuples – The .NET Framework 4 provides the
System..::.Tuple class for creating tuple objects that contain structured data.
File System Enumeration Improvements – You can now enumerate directories and files by using methods that return an enumerable collection of strings of their names. You can also use methods that return an enumerable collection of
DirectoryInfo, FileInfo, or FileSystemInfo objects.
Memory-Mapped Files – A memory-mapped file contains the contents of a file in virtual memory and is an application’s logical address space. So You can use memory-mapped files to edit very large files and to create shared memory for interprocess communication.
64-Bit Operating Systems and Processes – You can identify 64-bit operating systems and processes with the