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

◆ CopyToManaged< T >()

static unsafe void System.Runtime.InteropServices.Marshal.CopyToManaged< T > ( IntPtr source,
T[] destination,
int startIndex,
int length )
inlinestaticprivate

Definition at line 893 of file Marshal.cs.

894 {
895 if (source == IntPtr.Zero)
896 {
897 throw new ArgumentNullException("source");
898 }
899 if (destination == null)
900 {
901 throw new ArgumentNullException("destination");
902 }
903 if (startIndex < 0)
904 {
905 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndex);
906 }
907 if (length < 0)
908 {
909 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_NeedNonNegNum);
910 }
911 new Span<T>((void*)source, length).CopyTo(new Span<T>(destination, startIndex, length));
912 }

References System.SR.ArgumentOutOfRange_NeedNonNegNum, System.SR.ArgumentOutOfRange_StartIndex, System.Span< T >.CopyTo(), System.destination, System.length, System.source, System.startIndex, and System.IntPtr.Zero.