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

◆ Memory() [3/6]

System.Memory< T >.Memory ( T?[] array,
int start,
int length )
inline

Definition at line 109 of file Memory.cs.

110 {
111 if (array == null)
112 {
113 if (start != 0 || length != 0)
114 {
115 ThrowHelper.ThrowArgumentOutOfRangeException();
116 }
117 this = default(Memory<T>);
118 return;
119 }
120 if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
121 {
122 ThrowHelper.ThrowArrayTypeMismatchException();
123 }
124 if ((ulong)((long)(uint)start + (long)(uint)length) > (ulong)(uint)array.Length)
125 {
126 ThrowHelper.ThrowArgumentOutOfRangeException();
127 }
128 _object = array;
129 _index = start;
130 _length = length;
131 }
readonly int _length
Definition Memory.cs:19
readonly object _object
Definition Memory.cs:15
readonly int _index
Definition Memory.cs:17

References System.Memory< T >._index, System.Memory< T >._length, System.Memory< T >._object, System.array, System.length, System.start, System.ThrowHelper.ThrowArgumentOutOfRangeException(), and System.ThrowHelper.ThrowArrayTypeMismatchException().