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

◆ CopyTo() [4/4]

readonly void System.Numerics.Vector< T >.CopyTo ( T[] destination,
int startIndex )
inline

Definition at line 1004 of file Vector.cs.

1005 {
1006 ThrowHelper.ThrowForUnsupportedNumericsVectorBaseType<T>();
1007 if (destination == null)
1008 {
1009 throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
1010 }
1011 if ((uint)startIndex >= (uint)destination.Length)
1012 {
1013 throw new ArgumentOutOfRangeException("startIndex", SR.Format(SR.Arg_ArgumentOutOfRangeException, startIndex));
1014 }
1015 if (destination.Length - startIndex < Count)
1016 {
1017 throw new ArgumentException(SR.Format(SR.Arg_ElementsInSourceIsGreaterThanDestination, startIndex));
1018 }
1019 Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[startIndex]), this);
1020 }

References System.SR.Arg_ArgumentOutOfRangeException, System.SR.Arg_ElementsInSourceIsGreaterThanDestination, System.SR.Arg_NullArgumentNullRef, System.Numerics.Vector< T >.Count, System.destination, System.SR.Format(), and System.startIndex.