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

◆ AsBytes< T >() [1/2]

static ReadOnlySpan< byte > System.Runtime.InteropServices.MemoryMarshal.AsBytes< T > ( ReadOnlySpan< T > span)
inlinestatic
Type Constraints
T :struct 

Definition at line 37 of file MemoryMarshal.cs.

37 : struct
38 {
39 if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
40 {
41 ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
42 }
43 return new ReadOnlySpan<byte>(ref Unsafe.As<T, byte>(ref GetReference(span)), checked(span.Length * Unsafe.SizeOf<T>()));
44 }

References System.ThrowHelper.ThrowInvalidTypeWithPointersNotSupported().