/// <summary> /// Sort turns by PASS(Ascending) then by TURN VALUE(Descending) /// </summary> /// <param name="TurnA"></param> /// <param name="TurnB"></param> /// <returns></returns> int TurnSortMethodA(clsTurn TurnA, clsTurn TurnB) { //Sort by PASS first, Ascending if (TurnA.Pass < TurnB.Pass) return -1; else if (TurnA.Pass > TurnB.Pass) return 1; else { //If both turns are on the same PASS, then sort by VALUE, descending if (TurnA.Value < TurnB.Value) return 1; else if (TurnA.Value > TurnB.Value) return -1; else return 0; } }
/// <summary> /// Sort turns by TURN VALUE alone /// </summary> /// <param name="TurnA"></param> /// <param name="TurnB"></param> /// <returns></returns> int TurnSortMethodB(clsTurn TurnA, clsTurn TurnB) { if (TurnA.Value < TurnB.Value) return 1; else if (TurnA.Value > TurnB.Value) return -1; else return 0; }