A service project created in Visual Studio cannot be directly started in the debugger. A small tweak enables direct running of the service and gets rid of the need to deploy the service to test it. From the first time I tried developing a Windows Service in C++ back in the good old days before… Continue reading Debugging a Windows Service Project
Category: C#
Emulating Multiple Inheritance with Extension Methods
Last week I showed some ways to utilize extension methods. In this post I’ll go on with a more advanced example and also discuss some of the limitations. Method-Only Multiple Inheritance A combination of interfaces and extension methods can be used to partly work around the single inheritance limitation of C#. Assume that I have… Continue reading Emulating Multiple Inheritance with Extension Methods
Do you Care About Your Code?
A true master craftsman of any profession takes pride in doing a great work. A masterpiece is recognized by the combination of a great total impression and worked out details. Most programmers tend to think that their latest code is a masterpiece. I even went as far as starting this blog, to show off all… Continue reading Do you Care About Your Code?
Simplify Syntax with Extension Methods
Extension methods were first introduced with LINQ in C#3.0. They are just a syntactic construct, but as we’ll see in this post they can make a huge difference. What’s easier to read of these two? string[] wishList1 = Enumerable.ToArray( Enumerable.Select(Enumerable.Where(Animals, a => a.StartsWith("A")), a => string.Format("I want a {0}.", a))); string[] wishList2 = Animals.Where(a… Continue reading Simplify Syntax with Extension Methods
Speed up debugging using the DebuggerDisplayAttribute
Today’s post is written by guest blogger Albin Sunnanbo. He’s a great friend and source of inspiration and also one of the best developers I know. It was Albin that first introduced me to LINQ, EF Migrations and jQuery that I now use daily. In this post Albin shows how to use the [DebuggerDisplay] attributes… Continue reading Speed up debugging using the DebuggerDisplayAttribute