Category Archives: .NET FAQ

How to Create an Attached Properties in WPF

By | October 12, 2013

Well, attached properties, just like normal properties are an object of Dependency Property, but with a very special point embedded into it. Even though the attached properties can only be added to a class which inherits from DependencyObject and also the property where it is attached to should also be a dependency property itself, an Attached property in… Read More »

A better switch with Lambdas in .NET, Part 4 (Working with Types)

By | September 24, 2013

When dealing with the new Switch case constructs, I always wanted to add more to it. After adding things to it like, replacing the previous switch /case with lambdas, then adding a StringComparer and then adding IComparer, I thought let us add something really useful to it. The switch with Types is always one might have wanted with… Read More »

A better switch with Lambdas in .NET, Part 2 (A StringComparison implementation)

By | September 12, 2013

In my previous post, I have implemented one simple Lambda based switch case which complement the existing switch cases with some additional support of other objects that implements Equals operator in their code. But the implementation that I have provided wouldn’t made you much sense to add in your project or if you are really a fan of… Read More »

Using or Using ?

By | September 6, 2013

The title of this post is confusing enough! Really ? nevertheless to say, you are smart enough to guess on what we are going to talk about. One of the frequent question that comes in the .NET interview is “What is the difference between Using Directives and Using Statement ?” Sometimes the interviewers puts some extra trap by asking… Read More »

Selecting Cache Provider On the Fly in ASP.NET

By | March 19, 2011

If you have multiple Cache Provider in your ASP.NET application you can  set the output cache provider dynamically at runtime .  This is extremely useful if want to store cache data in different storage based on the usages of the data. To use this features you need to override the GetOutputCacheProviderName() method within the Global.asax file of your… Read More »