CompareTo() public méthode

public CompareTo ( ValueIndexPair other ) : int
other ValueIndexPair
Résultat int
 public void Add(ValueIndexPair e)
 {
     // bubble up:
     int where = _currentSize + 1; // new last place
     while (e.CompareTo(_theArray[Parent(where)]) > 0)
     {
         _theArray[where] = _theArray[Parent(where)];
         where = Parent(where);
     }
     _theArray[where] = e;
     _currentSize++;
 }