[]
        
(Showing Draft Content)

C1.Util.DX.DXUtil.SizeOf

SizeOf Method

SizeOf<T>()

Return the sizeof a struct from a CLR. Equivalent to sizeof operator but works on generics too.

Declaration
public static int SizeOf<T>() where T : struct
Returns
Type Description
int

Size of this struct.

Type Parameters
Name Description
T

A struct to evaluate.

SizeOf<T>(T[])

Return the sizeof an array of struct. Equivalent to sizeof operator but works on generics too.

Declaration
public static int SizeOf<T>(T[] array) where T : struct
Parameters
Type Name Description
T[] array

The array of struct to evaluate.

Returns
Type Description
int

Size in bytes of this array of struct.

Type Parameters
Name Description
T

A struct.