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

◆ ReadOnlyMemory() [2/3]

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

Definition at line 82 of file ReadOnlyMemory.cs.

83 {
84 if (array == null)
85 {
86 if (start != 0 || length != 0)
87 {
88 ThrowHelper.ThrowArgumentOutOfRangeException();
89 }
90 this = default(ReadOnlyMemory<T>);
91 return;
92 }
93 if ((ulong)((long)(uint)start + (long)(uint)length) > (ulong)(uint)array.Length)
94 {
95 ThrowHelper.ThrowArgumentOutOfRangeException();
96 }
97 _object = array;
98 _index = start;
100 }
readonly object _object

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