public int CompareTo(Transition <T> other) { int rFrom = StateFrom.CompareTo(other.StateFrom); int rTo = StateTo.CompareTo(other.StateTo); return((rFrom == 0 & rTo == 0) ? 0 : (rFrom != 0 ? rFrom : rTo)); }