Upper Case the First Letter of a String

Upper Case the First Letter of a String This is a simple string extension for upper casing the first letter of a string, the code originally came from here. public static class StringExtensions { public static string FirstLetterToUpperCase(this string s) { if (string.IsNullOrEmpty(s)) throw new ArgumentException(“There is no first letter”); Read more…

List Shuffling

List Shuffling This is just a simple extension for lists to enable the shuffling of items within it based on the StackOverflow answer here. This relies on System.Random so isn’t as random as it could be but is fine for my purposes. public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source, Random rng) Read more…