public int CompareTo(EncounterCategory other) { int catCompare = Category.CompareTo(other.Category); if (catCompare == 0) { int subCatCompare = SubCategory.CompareTo(other.SubCategory); /*if (subCatCompare == 0) * { * return InSubCategoryOrder.CompareTo(other.InSubCategoryOrder); * }*/ return(subCatCompare); } return(catCompare); }