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

◆ RemoveRange() [7/7]

ImmutableArray< T > System.Collections.Immutable.ImmutableArray< T >.RemoveRange ( int index,
int length )
inline

Implements System.Collections.Immutable.IImmutableList< T >.

Definition at line 1188 of file ImmutableArray.cs.

1189 {
1190 ImmutableArray<T> result = this;
1191 result.ThrowNullRefIfNotInitialized();
1192 Requires.Range(index >= 0 && index <= result.Length, "index");
1193 Requires.Range(length >= 0 && index + length <= result.Length, "length");
1194 if (length == 0)
1195 {
1196 return result;
1197 }
1198 T[] array = new T[result.Length - length];
1199 Array.Copy(result.array, array, index);
1200 Array.Copy(result.array, index + length, array, index, result.Length - index - length);
1201 return new ImmutableArray<T>(array);
1202 }
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
Definition Array.cs:624

References System.Collections.Immutable.ImmutableArray< T >.array, System.Array.Copy(), System.index, System.length, and System.Collections.Immutable.Requires.Range().

Referenced by System.Collections.Immutable.ImmutableArray< T >.RemoveAt(), System.Collections.Immutable.ImmutableArray< T >.RemoveRange(), and System.Collections.Immutable.ImmutableArray< T >.RemoveRange().