I believe you can just use a SortedList and for the key use a struct consisting of your two values and write an appropriate ICompare method. There may be a better way though.