Extending the int type to have a For method

It’s been months since I had anything interesting to blog about.  Mostly because I was working away on some new stuff I couldn’t talk about.  Anyway, now I feel like blogging again. I’m working on an Azure Worker Role which processes messages from an Azure Queue.  In the main loop of my Worker Role, I…

2

blambert/codesnip – Faster byte array to hex string conversion.

Got a tight loop where you convert an array of bytes into a hex string?  Here’s an updated blambert/codesnip: /// <summary> /// Hex string lookup table. /// </summary> private static readonly string[] HexStringTable = new string[] { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0A", "0B", "0C", "0D", "0E", "0F", "10", "11",…

1

blambert/codesnip – string extension method for validating that a string parameter is not null or empty.

I love extension methods.  Here’s a simple little string extension method: /// <summary> /// Validates that the input string is not null or empty. If the input /// string is null, ArgumentNullException will be thrown. If the input /// string is empty, ArgumentException will be thrown. /// </summary> /// <param name="value">The input string to validate.</param>…

1

blambert/codesnip – Fast byte array to hex string conversion.

Got a tight loop where you convert an array of bytes into a hex string?  Here’s a blambert/codesnip: /// <summary> /// Hex string lookup table. /// </summary> private static readonly string[] HexStringTable = new string[] { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0A", "0B", "0C", "0D", "0E", "0F", "10", "11", "12",…

4