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

◆ SameElementsInCollection< T >()

static bool System.Dynamic.Utils.ExpressionUtils.SameElementsInCollection< T > ( ICollection< T > replacement,
IReadOnlyList< T > current )
inlinestaticprivate
Type Constraints
T :class 

Definition at line 209 of file ExpressionUtils.cs.

209 : class
210 {
211 int count = current.Count;
212 if (replacement.Count != count)
213 {
214 return false;
215 }
216 if (count != 0)
217 {
218 int num = 0;
219 foreach (T item in replacement)
220 {
221 if (item != current[num])
222 {
223 return false;
224 }
225 num++;
226 }
227 }
228 return true;
229 }

References System.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.item.