You've stumbled across the archive of the blog posts I wrote back in 2014 and prior. Feel free to peruse, through everything from code snippets that never made it to GitHub, to random ramblings about my passion for technology.

So, I wrote this code, inspired by a Daily WTF post, which I wanted to make "more efficient":

public static string LastSixDigits(string number)
{
    return new List<string>(new string[] { number })
        .Where(n => !string.IsNullOrWhiteSpace(n) && n.Length >= 6)
        .DefaultIfEmpty(string.Empty)
        .First().Reverse().Take(6).Reverse()
        .Aggregate(string.Empty, (s, c) => s += c);
}

Continue reading...