.NET 4.0 – What’s New For Developers

Microsoft is consistently improving its .NET framework and providing its developers with enough tools to build sophisticated and large scale enterprise applications easily. Couple of months ago Microsoft released it’s latest version of .NET Framework, version 4.0, with tonnes of new features. Starting from CLR to WPF and  Visual Studio 2010, almost all the components .NET eco system are upgraded in the new version.

In this post, I’m going to thro some light on what is new in .NET Framework for developers who write code each and every day. Basically this is for junior developers who are more interested in learning the basics like new types, methods rather than interested in learning parallel programming and dynamic programming concepts.

New Types That Lets You Store Complex Values

 

BigInteger

This is a new structure introduced to operate on arbitrary large integer values. The existing data types byte, int have definite bounds that are defined by MinValue and MaxValue. But the BigInteger type does not have any bounds, you can store virtually any integer value.

So when to choose a BigInteger over the standard types like byte, int or long? If you are not sure of the size of resulting mathematical value, then use BigInteger. Or if you want to store an integer value like 91389681247993671255432112000000, which is not supported by primitive types.

BigInteger allows us to perform a variety of operations ranging from based additions to binary operations like XOr and OR.

You can read more details about BigInterger at MSDN and well as this blog post.

Complex

Do you remember the Complex numbers we use to learn while studying 12th grade maths & physics? Yeah, Complex number are widely used in solving problems in physics, astronomy and geometry.

.NET Framework 4.0 have a new structure called Complex to manipulate Complex numbers. So the developers who are writing complex mathematical and physics app should be happy with the new type. For more information read this MSDN page

Tuples

Yet another data type for mathematicians. The .NET 4.0 type Tuple provides static methods for creating instances of the tuple types.  Here is an example of defining a tuple in .NET 4.0 C# language

 

var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19);

For more details on Tuple type in .NET check this MSDN article, if you want to know the basics of Tuples then head towards Wikipedia.

New Methods On Often Use Types/Classes

For a complete list of new types and methods introduced in .NET Framework 4.0 check this page: New Types and Members in the .NET Framework 4

For a complete list of new features  in .NET Framework 4.0 check the page: What’s New in the .NET Framework 4

Leave a Comment

Your email address will not be published. Required fields are marked *