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

◆ SetRange()

override void System.Collections.ArrayList.IListWrapper.SetRange ( int index,
ICollection c )
inlinevirtual

Reimplemented from System.Collections.ArrayList.

Definition at line 454 of file ArrayList.cs.

455 {
456 if (c == null)
457 {
458 throw new ArgumentNullException("c", SR.ArgumentNull_Collection);
459 }
460 if (index < 0 || index > _list.Count - c.Count)
461 {
462 throw new ArgumentOutOfRangeException("index", SR.ArgumentOutOfRange_Index);
463 }
464 if (c.Count > 0)
465 {
466 IEnumerator enumerator = c.GetEnumerator();
467 while (enumerator.MoveNext())
468 {
469 _list[index++] = enumerator.Current;
470 }
471 _version++;
472 }
473 }

References System.Collections.ArrayList.IListWrapper._list, System.Collections.ArrayList._version, System.SR.ArgumentNull_Collection, System.SR.ArgumentOutOfRange_Index, System.Collections.ICollection.Count, System.Collections.IEnumerator.Current, System.Collections.IEnumerable.GetEnumerator(), System.index, and System.Collections.IEnumerator.MoveNext().