Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ExceptWith()

void System.Collections.Generic.SortedSet< T >.ExceptWith ( IEnumerable< T > other)
inlineinherited

Implements System.Collections.Generic.ISet< T >.

Definition at line 1525 of file SortedSet.cs.

1526 {
1527 if (other == null)
1528 {
1529 throw new ArgumentNullException("other");
1530 }
1531 if (count == 0)
1532 {
1533 return;
1534 }
1535 if (other == this)
1536 {
1537 Clear();
1538 }
1539 else
1540 {
1542 {
1543 if (comparer.Compare(sortedSet.Max, Min) < 0 || comparer.Compare(sortedSet.Min, Max) > 0)
1544 {
1545 return;
1546 }
1547 T min = Min;
1548 T max = Max;
1549 {
1550 foreach (T item in other)
1551 {
1552 if (comparer.Compare(item, min) >= 0)
1553 {
1554 if (comparer.Compare(item, max) > 0)
1555 {
1556 break;
1557 }
1558 Remove(item);
1559 }
1560 }
1561 return;
1562 }
1563 }
1565 }
1566 }
void RemoveAllElements(IEnumerable< T > collection)
Definition SortedSet.cs:816
bool HasEqualComparer(SortedSet< T > other)

References System.Collections.Generic.SortedSet< T >.Clear(), System.Collections.Generic.IComparer< in T >.Compare(), System.Collections.Generic.SortedSet< T >.comparer, System.Collections.Generic.SortedSet< T >.count, System.Collections.Generic.SortedSet< T >.HasEqualComparer(), System.item, System.Collections.Generic.SortedSet< T >.Max, System.Collections.Generic.SortedSet< T >.Min, System.other, System.Collections.Generic.SortedSet< T >.Remove(), and System.Collections.Generic.SortedSet< T >.RemoveAllElements().