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

◆ SizeOf< T >()

static uint System.Runtime.InteropServices.SafeBuffer.SizeOf< T > ( )
inlinestaticpackageinherited
Type Constraints
T :struct 

Definition at line 265 of file SafeBuffer.cs.

265 : struct
266 {
267 if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
268 {
269 throw new ArgumentException(SR.Argument_NeedStructWithNoRefs);
270 }
271 return (uint)Unsafe.SizeOf<T>();
272 }

References System.SR.Argument_NeedStructWithNoRefs.

Referenced by System.Runtime.InteropServices.SafeBuffer.AlignedSizeOf< T >(), System.Runtime.InteropServices.SafeBuffer.Read< T >(), and System.Runtime.InteropServices.SafeBuffer.Write< T >().