コード例 #1
0
 protected override int CompareToSameType(RowEditBase rowEdit)
 {
     // We want to sort by row ID *IN REVERSE* to make sure we delete from the bottom first.
     // If we delete from the top first, it will change IDs, making all subsequent deletes
     // off by one or more!
     return(RowId.CompareTo(rowEdit.RowId) * -1);
 }
コード例 #2
0
 /// <summary>
 /// Compares two row edits by their row ID ascending.
 /// </summary>
 /// <param name="rowEdit">The other row edit to compare against</param>
 private int CompareByRowId(RowEditBase rowEdit)
 {
     return(RowId.CompareTo(rowEdit.RowId));
 }