New features in Microsoft .NET Framework 4.6

Microsoft .NET Framework 4.6 is the next version of the widely popular managed runtime environment from the software giant. Microsoft .NET Framework 4.6 ships with Visual Studio 2015 and includes some exciting new features and enhancements. These include the following:

Updates to the Base Class Library (BCL)
Support for RyuJIT
Event tracing enhancements
Support for code page encodings
Other enhancements
.NET Native

Updates to Base Class Library (BCL)

The Base Class Library (BCL) is a collection of types in .NET Framework. There have been some major updates to the Base Class Library (BCL). In the earlier versions of .NET Framework the CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture properties were read only.

With .NET Framework 4.6, these properties are now read-write. So, if you assign a CultureInfo instance to either of these properties, the CurrentCulture and CurrentUICulture properties would also be updated to reflect the change.

Support for RyuJIT

Just in Time compiler (JIT) as the name suggests, compiles your byte code to machine readable code at run time — hence the name. Microsoft .NET Framework 4.6 provides support for next generation JIT compiler named RyuJIT. This is a 64-bit JIT compiler that is much improved and optimized for use in systems that support 64-bit computing. This release of JIT has fixed the reported bugs in the earlier versions of JIT and includes SMID improvements also. There is a major improvement in the startup time with this optimized JIT.

Event Tracing Enhancements

Event tracing is now improved in .NET Framework 4.6. You can now create an EventSource instance and invoke one of its Write() methods.

Support for Code Page Encodings

Support for code page encoding is now available. You need to add a reference to the System.Text.Encoding.CodePages.dll assembly to take advantage of this feature. The CodePagesEncodingProvider class enables access to an encoding provider for code pages. You would then need to register code page encodings using the Encoding.RegisterProvider method.

Note that this is only supported in the desktop .NET Framework and not in the version of .NET Framework 4.6. For your information, Microsoft .NET Framework 4.6 provides support for the following encodings only:

ASCII (code page 20127)
ISO-8859-1 (code page 28591)
UTF-7 (code page 65000)
UTF-8 (code page 65001)
UTF-16 and UTF-16LE (code page 1200)
UTF-16BE (code page 1201)
UTF-32 and UTF-32LE (code page 12000)
UTF-32BE (code page 12001)

Other Enhancements

Microsoft .NET Framework 4.6 includes Immutable Collections and SIMD APIs — these are now available in GitHub as open source. There have been enhancements in the collection framework as well. The following new collection classes have been introduced.

Some new cryptography APIs have also been introduced — these include the following:

SymmetricAlgorithm.KeyExchangeAlgorithm
AsymmetricAlgorithm.SignatureAlgorithm
System.Security.Cryptography.X509Certificates.X509Certificate

Conclusion: The Microsoft .NET Framework provides a platform for building applications targeted at a managed runtime environment. Microsoft .NET Framework 4.6 ships with Visual Studio 2015 and comes with features aplenty. In this article we explored the new features and enhancements in .NET Framework 4.6. Happy reading!

About the author: A Microsoft Most Valuable Professional in ASP.Net, as well as a speaker and the author of several books and articles. He received the prestigious MVP (Most Valuable Professional) award at ASP.Net for 2007, 2008, 2009, 2010, 2011, and 2012. He has more than 18 years of industry experience in IT, with more than 12 years in Microsoft .Net and its related technologies. He has been selected as MSDN Featured Developer of the Fortnight (MSDN) and as Community Credit Winner several times. He is the author of eight books and more than 250 articles. Many of his articles have been featured at Microsoft’s Official Site on ASP.Net. He was a speaker at the reputed Spark IT 2010 event and at the reputed Dr. Dobb’s Conference 2014 in Bangalore. He was also a speaker at SSWUG Virtual Conference in April, 2015. He’s also worked as a judge for the Jolt Awards at Dr. Dobb’s Journal.

Leave a Reply

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