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

◆ ReadArray< T >()

void System.Runtime.InteropServices.SafeBuffer.ReadArray< T > ( ulong byteOffset,
T[] array,
int index,
int count )
inlineinherited
Type Constraints
T :struct 

Definition at line 107 of file SafeBuffer.cs.

107 : struct
108 {
109 if (array == null)
110 {
111 throw new ArgumentNullException("array", SR.ArgumentNull_Buffer);
112 }
113 if (index < 0)
114 {
115 throw new ArgumentOutOfRangeException("index", SR.ArgumentOutOfRange_NeedNonNegNum);
116 }
117 if (count < 0)
118 {
119 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_NeedNonNegNum);
120 }
121 if (array.Length - index < count)
122 {
123 throw new ArgumentException(SR.Argument_InvalidOffLen);
124 }
125 ReadSpan(byteOffset, new Span<T>(array, index, count));
126 }

References System.SR.Argument_InvalidOffLen, System.SR.ArgumentNull_Buffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, System.count, and System.index.