Extension methods, what you shouldn’t do

I’ll admit it, I love extension methods, especially the ones from the LinQ-to-objects framework.

However I often see them abused, partly by making everything extension methods, and partly by breaking readability with methods which normally shouldn’t work.

Also I’d like to share a few of my extension methods with you – intrigued ? Read on 🙂

Read More »

Accessing session in HttpHandlers

In ASP.Net HttpHandlers cannot access the session state by default, in order to enable them to do so, you need to implement an interface.

However this is rather simple, since the interface is just a “marker interface” as MSDN calls it. Here’s how to do it.

Read More »

DÃ¥rlige vaner ved brug af “lock”

lock keywordet i C# er en enkel måde at håndtere tråd sikkerhed på, og i mange tilfælde også den bedste måde.

Desværre bruger en del udviklere keywordet “forkert”, sÃ¥ her er et oprids, af hvad man bør gøre.

Read More »