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

◆ SequenceEqual< TDerived, TBase >() [2/3]

static bool System.Linq.ImmutableArrayExtensions.SequenceEqual< TDerived, TBase > ( this ImmutableArray< TBase > immutableArray,
ImmutableArray< TDerived > items,
Func< TBase, TBase, bool > predicate )
inlinestatic
Type Constraints
TDerived :TBase 

Definition at line 119 of file ImmutableArrayExtensions.cs.

119 : TBase
120 {
121 Requires.NotNull(predicate, "predicate");
122 immutableArray.ThrowNullRefIfNotInitialized();
123 items.ThrowNullRefIfNotInitialized();
124 if (immutableArray.array == items.array)
125 {
126 return true;
127 }
128 if (immutableArray.Length != items.Length)
129 {
130 return false;
131 }
132 int i = 0;
133 for (int length = immutableArray.Length; i < length; i++)
134 {
135 if (!predicate(immutableArray[i], (TBase)(object)items[i]))
136 {
137 return false;
138 }
139 }
140 return true;
141 }

References System.length, and System.Linq.predicate.