March 05, 2013

IEnumerator Cloning

A word of warning. I'm about to show you something you should probably never do. I really enjoy using LINQ in C#. Much of it is founded on IQueryable and IEnumerable types. One time I was deep diving into the inner workings of enumerable types to try to find a simpler syntax to manage some complex…

Continue reading
  February 05, 2013

How to make a basic test framework in C#

Unit testing can be an excellent approach to building applications. In C#, there is a fairly standard convention that you often see. You'll often see a test structure like this:

[TestClass]
          public class UnitTest1
          {
            [TestInitialize]
            public void Setup()
            {
            }
            [TestMethod]
            public void TestMethod1()
            {
            }
          }…
Continue reading
  January 14, 2013

WPF Binding Errors

I find the binding aspect of WPF to be very powerful. There's one part that I found challenging. If the binding wasn't just right, the problem wouldn't be obvious. If I make a typo when binding to a property, I like it to be painfully obvious. So, the project now displays a message box if there was…

Continue reading
  July 07, 2012

Using NCrunch to find bottlenecks visually

All examples are from NCrunch Version 1.40b.

NCrunch is a continuous test runner for C#. I enjoy using it to test my code with a less jarring mental switch. It displays the status of test runs in visual studio as a color coded circle. In addition, it shows the status next to each line that was run.

Continue reading