Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SZGenericArrayEnumerator.cs
Go to the documentation of this file.
3
4namespace System;
5
7{
8 private readonly T[] _array;
9
10 private int _index;
11
12 internal static readonly SZGenericArrayEnumerator<T> Empty = new SZGenericArrayEnumerator<T>(new T[0]);
13
14 public T Current
15 {
16 get
17 {
18 int index = _index;
19 T[] array = _array;
20 if ((uint)index >= (uint)array.Length)
21 {
23 }
24 return array[index];
25 }
26 }
27
28 object IEnumerator.Current => Current;
29
31 {
32 _array = array;
33 _index = -1;
34 }
35
36 public bool MoveNext()
37 {
38 int num = _index + 1;
39 if ((uint)num >= (uint)_array.Length)
40 {
41 _index = _array.Length;
42 return false;
43 }
44 _index = num;
45 return true;
46 }
47
49 {
50 _index = -1;
51 }
52
53 public void Dispose()
54 {
55 }
56}
static void ThrowInvalidOperationException_EnumCurrent(int index)