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

◆ WriteArray< T >()

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

Definition at line 183 of file SafeBuffer.cs.

183 : struct
184 {
185 if (array == null)
186 {
187 throw new ArgumentNullException("array", SR.ArgumentNull_Buffer);
188 }
189 if (index < 0)
190 {
191 throw new ArgumentOutOfRangeException("index", SR.ArgumentOutOfRange_NeedNonNegNum);
192 }
193 if (count < 0)
194 {
195 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_NeedNonNegNum);
196 }
197 if (array.Length - index < count)
198 {
199 throw new ArgumentException(SR.Argument_InvalidOffLen);
200 }
201 WriteSpan(byteOffset, new ReadOnlySpan<T>(array, index, count));
202 }

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