Browse by Tags

All Tags » C# (RSS)

TPL Dataflow–An overview by nmarun

Some time back I blogged about Parallel Tasks that was introduced in .net 4.0. This was a part of the Task Parallel Library (TPL) made available to the developer community to add parallel / concurrency concepts to their applications. They have gone a...

Good ol’ DebuggerDisplay attribute by nmarun

I got to know about this DebuggerDisplay attribute that you can use on your types for ease of debugging, seems like this has been there since VS2005. Lets’ get started. I have an Employee class which is being used somewhere in the code. Just as any other...
Filed under: , ,

Solution Explorer gets new features in VS 2011 by nmarun

The more I play with VS 2011 (in Dev Preview, don’t hold me if things in future versions don’t have what I’ve mentioned below), the more interesting I find it. Productivity Power Tools is a VS plugin which has some interesting features (blogged here ...

ReadOnlyDictionary in .net 4.5 by nmarun

Oh yea, .net 4.5 is out (although it’s still Developer Preview). Some time back, I blogged about a ReadOnlyCollection and .net 4.5 has introduced a similar concept with a Dictionary object – a ReadOnlyDictionary type in the System.Collections.ObjectModel...

Using Autofac DynamicProxy2 Interceptors with MVC3–Part 2 by nmarun

Continuing from the previous post , the interceptor is now ready to be registered and consumed. In the Application_Start() method of my Global.asax.cs, I create an instance of the IoC container and register all the types. 1: protected void Application_Start...

Using Autofac DynamicProxy2 Interceptors with MVC3–Part 1 by nmarun

Autofac is an IoC container and using DynamicProxy we can intercept method calls to perform custom logic. What this means is that, you can actually add ‘hooks’ to methods in your code so that when these methods are called, you automatically invoke an...

Some cool features introduced in ReSharper 6 by nmarun

I recently upgraded to ReSharper 6 and the experience so far has only been positive. Here are the top things for which I said ‘Good job Jetbrains ’. View Completion – So now you will be able to get intellisense on Views as well. Say you’re in your razor...
Filed under: , , , ,

Registering KnownType types at runtime using IsAssignableFrom() by nmarun

While doing some reflection, I hit this method IsAssignableFrom(). MSDN says: “Determines whether an instance of the current Type can be assigned from an instance of the specified Type.” With a boolean return type, it returns: “true if c and the current...
Filed under: , ,

Extension methods on a null object instance by nmarun

Extension methods gave developers with a lot of bandwidth to do interesting (read ‘cool’) things. But there are a couple of things that we need to be aware of while using these extension methods. I have a StringUtil class that defines two extension methods...
Filed under: , ,

IEnumerator.Current property and IEnumerator.MoveNext method by nmarun

Here’s a question: What happens to the Current property of an IEnumerator before and after the MoveNext() call? When I say ‘after the MoveNext() call’, I mean after MoveNext() returns a false indicating an end of the collection. I was going through the...
Filed under: ,
More Posts Next page »