Programming

Recursive Object Properties

Recursive Object Properties I’ve been working to create a virtual file system for SQL databases and represent this in a web interface. While creating the classes in .NET I realised that I needed to be able to traverse all the ancestors of a file up to the root level and Read more…

By Shinigami, ago
Programming

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…

By Shinigami, ago