An Exercise in Refactoring - Specification Pattern

11 Dec 2017 -

This post is the eleventh installment of the 2017 C# Advent Calendar operated by Matthew Groves. Thanks for letting me participate! This article is based on a video on DimeCasts.Net on the Specification Design Pattern. DimeCasts was a great source of short videos on .NET and other development topics. Unfortunately, they are no longer accepting...

Read more ...

HumanNameParser - Parsing people's names.

12 Nov 2017 -

HumanNameParser - Breaking a name into it’s parts. Recently I needed to be able to take a list of names, and separate them into First Name and Last name. Of course, it’s not quite as simple as that, because names come in all kinds of forms. So, naturally, I googled to find an algorithm for...

Read more ...

Forgotten .NET Gem --- StringDictionary

14 Oct 2017 -

Forgotten .NET Gem — StringDictionary In the olden days of .NET v1.1, before we had generics, when collections were liimited to arrays and ArrayList, Microsoft tried to fill the gap with a few niche collection classes, which it placed in the nearly forgotten System.Collection.Specialized namespace. Most were superceded by generic version once .NET v2.0 came...

Read more ...

Every --- Doing Something Occasionally

12 Oct 2017 -

Every — Doing Something Occasionally I recently had a need for a class I wrote a long time ago in C++. But I was working in C#, so I had to recreate it. Fortunately. with lambdas and closures. the C# version was much easier than the last one. Sometimes, when looping through a large collection,...

Read more ...

TimeRange - a TimeSpan alternative

10 Oct 2017 -

TimeRange - a TimeSpan alternative. Today I wrote a class to build a report. It has a method to retrieve data over a given range of dates. Sometimes it will one day, other times, three months or a year. I wanted to paramterize that, but that wasn’t as easy as it seems. Now, I could...

Read more ...

Older Posts......