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

◆ IntersectWith()

void System.Collections.Generic.HashSet< T >.IntersectWith ( IEnumerable< T > other)
inline

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

Definition at line 470 of file HashSet.cs.

471 {
472 if (other == null)
473 {
474 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.other);
475 }
476 if (Count == 0 || other == this)
477 {
478 return;
479 }
480 if (other is ICollection<T> collection)
481 {
482 if (collection.Count == 0)
483 {
484 Clear();
485 return;
486 }
488 {
490 return;
491 }
492 }
494 }
void IntersectWithEnumerable(IEnumerable< T > other)
Definition HashSet.cs:1046
void IntersectWithHashSetWithSameComparer(HashSet< T > other)
Definition HashSet.cs:1029
static bool EqualityComparersAreEqual(HashSet< T > set1, HashSet< T > set2)
Definition HashSet.cs:1153

References System.Collections.Generic.HashSet< T >.Clear(), System.collection, System.Collections.Generic.HashSet< T >.Count, System.Collections.Generic.HashSet< T >.EqualityComparersAreEqual(), System.Collections.Generic.HashSet< T >.IntersectWithEnumerable(), System.Collections.Generic.HashSet< T >.IntersectWithHashSetWithSameComparer(), System.other, and System.ThrowHelper.ThrowArgumentNullException().