Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     

.NET interview questions: - Mention any 3 new features available in .NET Framework 4.5?

There are many new features in .NET Framework. So in this .NET interview questions section quickly go through new exciting feature of .NET 4.5 framework.

1) Set Default culture to App Domain

In the previous versions of .NET if I need to set culture I need to do it on every thread. Below is a sample code which demonstrates the pain of setting culture at thread levels.That was a real pain when we have heavy multi-threaded application.

CultureInfo cul = new CultureInfo(strCulture);

Thread.CurrentThread.CurrentCulture = cul;

Thread.CurrentThread.CurrentUICulture = cul;

In 4.5 we can set culture at the app domain level and all the threads inside that appdomain will inherit that culture.  Below is a sample code of how to implement “DefaultThreadCurrentCulture”.

CultureInfo culture = CultureInfo.CreateSpecificCulture("fr-FR");
CultureInfo.DefaultThreadCurrentCulture = culture;

2) Array support more than 2 Gigabyte size

I am not sure what kind of scenario we need a 2 Giga collection. So I personally did not see where we need this feature. If I ever need such a big collection I would break it in to parts. But I am sure there should be a good reason for this feature to be enabled in the framework.

3) Unicode support for console

I left this feature out from discussion as very less people work with console application. I have seen people using console only for academic purpose. Said and done we now have Unicode support for console apps also.

Helpful Website Url
Share this article   |    Print    |    Article read by 2975 times
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: No related interview question