Tag Archives: .NET 4.0



Initialize assemblies using PreApplicationStartMethod for ASP.NET 4.0 Application

Sometimes your ASP.NET application needs to hook up some code before even the Application is started. Assemblies supports a custom attribute called PreApplicationStartMethod which can be applied to any assembly that should be loaded to your ASP.NET application, and the ASP.NET engine will call the method you specify within it before actually running any of […]

ThreadLocal storage in .NET

Similar to Lazy, ThreadLocal creates object local to one thread. So each individual thread will have its own Lazy initializer object and hence will create the object multiple times once for each thread. In .NET 3.5 or before, you can create objects that are local to one thread using ThreadStatic attribute. But sometimes ThreadStatic fails […]

Barrier in .NET 4.0

Barrier is a new type introduced in .NET 4.0. It allows the user to define the synchronization primitives and lets your Threads to run code simultaneously in predefined phases. A Barrier defines a phases in such a way that the Thread executing some set of code reaches a certain point where it is stopped and […]

Working with BigInteger in .NET 4.0

One of the interesting feature that is added with .NET 4.0 is the support of BigInteger. Big numbers are needed when a number cannot be held with any of the existing data types available with .NET framework. Long has the highest value of 9,223,372,036,854,775,807 which is 0x7FFFFFFFFFFFFFFF in hexadecimal. This is the highest value of […]

Debugging 64 bit application using IntelliTrace – Visual Studio 2010 SP1

IntelliTrace is a new feature of Visual Studio 2010 Ultimate Edition. By default, IntelliTrace is enabled. During debugging in Visual Studio, IntelliTrace works in the background and collects debugging information automatically and stores them in IntelliTrace Log File (.iTrace file). You can use the log file at any point of time to see what happened […]