.NET
-
Using IDisposable to restore temporary settings example
This is WinForms code from a long time ago, but the concept of using an IDisposable interface to do resource…
Read More » -
Retrieving GAC Assemblies and Information
Retrieving GAC assemblies and their information. This was a question posed by one of my colleagues while he was developing…
Read More » -
Refactor “if” statements – functional programming style
Have you ever seen code that look like this: public string GetStatusDescription(Model model){ if(model.HasProblemReports) { return "Errors"; } if(model.SystemState.WorkingMode ==…
Read More » -
Correctly Implementing Equals() in C#
It’s said that “the devil is in the details”. Well I saw some code the other day that reminded me…
Read More » -
ASP.net MVC3: Doesn’t Deserialize Nullable Properties from Json
A couple of days ago I noticed that the Nullable properties of a C# object were not properly deserialized when…
Read More » -
Posting JSON Data to an ASP.net MVC 3 Web Application
The trend in today’s web application development goes more and more in the direction of having rich, desktop-like applications. There…
Read More » -
Smelly Code: Direct Object Instantiation as a Testability Killer
This Smelly Code post discusses mainly a testability issue without going into further detail on other things like readability which…
Read More » -
Aspect Oriented Programming with Action
Aspect Oriented Programming (AOP) is a pretty great concept. It is a little difficult to implement though. To be honest, I…
Read More » -
Explaining What Action And Func Are
In C#, Action<> and Func<> are extremely useful tools for reducing duplication in code and decreasing coupling. It is a…
Read More » -
Playing around with PLINQ and IO-bound tasks
I recently downloaded Visual Studio 2010 beta, and took the chance to play with PLINQ. PLINQ, for those of you…
Read More »