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

◆ HashSet() [5/7]

System.Collections.Generic.HashSet< T >.HashSet ( IEnumerable< T > collection,
IEqualityComparer< T >? comparer )
inline

Definition at line 154 of file HashSet.cs.

155 : this(comparer)
156 {
157 if (collection == null)
158 {
159 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection);
160 }
162 {
164 return;
165 }
166 if (collection is ICollection<T> { Count: var count } && count > 0)
167 {
169 }
171 if (_count > 0 && _entries.Length / _count > 3)
172 {
173 TrimExcess();
174 }
175 }
void UnionWith(IEnumerable< T > other)
Definition HashSet.cs:458
static bool EqualityComparersAreEqual(HashSet< T > set1, HashSet< T > set2)
Definition HashSet.cs:1153
void ConstructFrom(HashSet< T > source)
Definition HashSet.cs:195

References System.Collections.Generic.HashSet< T >._count, System.Collections.Generic.HashSet< T >._entries, System.collection, System.Collections.Generic.HashSet< T >.ConstructFrom(), System.count, System.Collections.Generic.HashSet< T >.Count, System.Collections.Generic.HashSet< T >.EqualityComparersAreEqual(), System.Collections.Generic.HashSet< T >.Initialize(), System.ThrowHelper.ThrowArgumentNullException(), System.Collections.Generic.HashSet< T >.TrimExcess(), and System.Collections.Generic.HashSet< T >.UnionWith().