Implementation of general datastructures in C#, such as binary heaps