int n = sizeof(T);
n is the size in managed memory of built-in value type (numeric types, char, and bool) T. Permitted in safe contexts.
In a safe context, sizeof is only permitted for built-in value types. Because there is no corresponding type parameter constraint, the operand of_sizeof cannot be a type parameter in a safe context.
In a safe context, sizeof is only permitted for built-in value types. Because there is no corresponding type parameter constraint, the operand of_sizeof cannot be a type parameter in a safe context.