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

◆ Overlaps()

bool System.Collections.Generic.HashSet< T >.Overlaps ( IEnumerable< T > other)
inline

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

Definition at line 661 of file HashSet.cs.

662 {
663 if (other == null)
664 {
665 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.other);
666 }
667 if (Count == 0)
668 {
669 return false;
670 }
671 if (other == this)
672 {
673 return true;
674 }
675 foreach (T item in other)
676 {
677 if (Contains(item))
678 {
679 return true;
680 }
681 }
682 return false;
683 }

References System.Collections.Generic.HashSet< T >.Contains(), System.Collections.Generic.HashSet< T >.Count, System.item, System.other, and System.ThrowHelper.ThrowArgumentNullException().