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

◆ Write< T >()

static void System.Runtime.InteropServices.MemoryMarshal.Write< T > ( Span< byte > destination,
ref T value )
inlinestatic
Type Constraints
T :struct 

Definition at line 274 of file MemoryMarshal.cs.

274 : struct
275 {
276 if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
277 {
278 ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
279 }
280 if ((uint)Unsafe.SizeOf<T>() > (uint)destination.Length)
281 {
282 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
283 }
284 Unsafe.WriteUnaligned(ref GetReference(destination), value);
285 }

References System.destination, System.ThrowHelper.ThrowArgumentOutOfRangeException(), System.ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(), and System.value.