.NET
-
Enabling parameterized tests in MSTest using PostSharp
I have blogged about the shortcoming of Microsoft’s unit testing framework in the past. It has very good Visual Studio…
Read More » -
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 »