[]
Return the sizeof a struct from a CLR. Equivalent to sizeof operator but works on generics too.
public static int SizeOf<T>() where T : struct
Type | Description |
---|---|
int | Size of this struct. |
Name | Description |
---|---|
T | A struct to evaluate. |
Return the sizeof an array of struct. Equivalent to sizeof operator but works on generics too.
public static int SizeOf<T>(T[] array) where T : struct
Type | Name | Description |
---|---|---|
T[] | array | The array of struct to evaluate. |
Type | Description |
---|---|
int | Size in bytes of this array of struct. |
Name | Description |
---|---|
T | A struct. |