public int CompareTo( object obj ) { PointToProcess another = (PointToProcess) obj; return ( K < another.K ) ? -1 : ( K > another.K ) ? 1 : ( ( Distance > another.Distance ) ? -1 : ( Distance < another.Distance ) ? 1 : 0 ); }