.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> C# >> Post New Resource Bookmark and Share   

 Subscribe to Articles

.NET 4.0 Features

Posted By:Sipra       Posted Date: April 30, 2010    Points: 25    Category: C#    URL: http://www.dotnetspark.com  

Describing .NET 4.0 enhancements and features
 

Features of .NET Framework 4.0


This contains new features and improvements in the .NET Framework version 4.0.

Common Language Runtime (CLR)

It contains new features in security, parallel computing, performance and diagnostics, dynamic language runtime.

Security

The .NET Framework 4.0 provides simplifications, improvements, and expanded capabilities in the security model.

Parallel Computing
The .NET Framework 4.0 introduces a new model for writing multithreaded and asynchronous code that greatly simplifies the work of application and library developers. This model enables developers to fine-grained and scalable parallel code in a natural language without having to work directly with threads or the thread pool. Two new classes introduced Parallel and Task. Parallel LINQ (PLINQ), which is a parallel implementation of LINQ to Objects, enables similar functionality through declarative syntax.

Performance and Diagnostics
In addition .NET Framework 4.0 provides improvements in startup time, working set sizes, and faster performance for multithreaded applications.

ETW Events
Now Event Tracing for Windows (ETW) events can be accessed for diagnostic purposes to improve performance.
Performance Monitor (Perfmon.exe) now enables you to disambiguate multiple applications that use the same name and multiple versions of the common language runtime loaded by a single process by doing registry modification.

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.Diagonostics.Contracts namespace contains classes that provide a language-neutral way to express coding assumptions in the form of pre-conditions, post-conditions, and object invariants. The contracts improve testing with run-time checking; enable static contract verification, and documentation generation.
This includes:

  • Perform static bug finding, which enables some bugs to be found without executing the code.
  • Create guidance for automated testing tools to enhance test coverage.
  • Create a standard notation for code behavior, which provides more information for documentation.

Lazy Initialization
With lazy initialization, the memory for an object is not allocated until it is needed. Lazy initialization can improve performance by spreading object allocations evenly across the lifetime of a program.

Dynamic Language Runtime(DLR)
The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. To support the DLR,a new namespace is added "System.Dynamic".

In-Process Side-by-Side Execution
In-process side-by-side hosting enables an application to load and activate multiple versions of the common language runtime (CLR) in the same process.

Interoperability
New interoperability features and improvements include the following:

  • PIAs are not a problem now days. Compilers embed the parts of the interop assemblies that the add-ins actually uses, and type safety is ensured by the common language runtime.

Profiling
In the .NET Framework 4.0, you can attach profilers to a running process at any point, perform the requested profiling tasks, and then detach

Garbage Collection

The .NET Framework 4.0 provides background garbage collection.

Covariance and Contravariance

Several generic interfaces and delegates now support covariance and contravariance. Covariant and contravariant generic type parameters provide greater flexibility in assigning and using generic types

Tuples

A tuple is a simple generic data structure that holds an ordered set of items of heterogeneous types. Tuples are supported natively in languages such as F# and IronPython, .NET Framework 4.0 adds eight new generic tuple classes, and also a Tuple class that contains static factory methods for creating tuples.

Exceptions Handling

The .NET Framework 4.0 class library contains the new System.Runtime.ExceptionServices for advanced exception handling.

I/O

The key new features in I/O are efficient file enumerations, memory-mapped files, and improvements in isolated storage and compression.

Isolated Storage Improvements
Partial-trust applications, such as WPF browser now have same capabilities in .NET Framework as in Silverlight. The default quota size is doubled, and applications can prompt the user to approve or reject a request to increase the quota.

Reflection
The .NET Framework 4.0 provides the capability to monitor the performance of your application domains.

Application Domain Resource Monitoring

Earlier there was no way to determine whether a particular application domain is affecting other application domains, because the operating system APIs and tools, such as the Windows Task Manager, were precise only to the process level. Starting with the .NET Framework 4.0, we can get processor usage and memory usage estimates per application domain.
Application domain resource monitoring is available through the managed AppDomain class, native hosting APIs, and event tracing for Windows (ETW). When this feature has been enabled,

64-bit View and Other Registry Improvements
Windows registry improvements include the following:

  • Ability to specify a 32-bit or 64-bit view of the registry with the

Threading
Threading includes the following:

The following sections describe new threading features.

Thread-Safe Collection Classes

To provide thread safe and lock free access to resources when needed a new namespace is aaded named as System.Collections.Concurrent, basically meant for multi threading purpose.

Networking
Enhancements have been made in System.Net, HttpWebRequest, HttpListner, SmtpClient namespaces for handling authentication in windows and available for Windows 7.


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

    Read also another Resources from the same Author

Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend