OneTrueError - Automated exception handling

Tag Archives: extension methods

Why extension methods should not be used as part of a framework.

Two of my favorite frameworks/libraries uses extension methods heavily. Autofac uses extension methods during registration and ASP.NET MVC3 for their HTML Helpers. Since extension methods are static, they are closed for extension. Which are one of the most important principles … Continue reading

Posted in Architecture, CodeProject | Tagged , , | 1 Comment

More natural string formatting using an extension method

If you are like me, you don’t determine if you should include parameters in string before you start writing, thus you haven’t decided that string.Format should be used until it’s too late. You then need to go back and refactor … Continue reading

Posted in extensionmethods | Tagged | Leave a comment

Extension methods to simplify database handling.

Two extension methods used to simplify database handling. Usage The following code: becomes Best of all, the code becomes driver independent. (You can switch between SQLiteConnection, SqlClientConnection or whatever without any code modifications).

Posted in Uncategorized | Tagged , , | Leave a comment