Method BitSizeOf
BitSizeOf(ITypeRef)
Returns the number of bits necessary to hold the specified type.
public ulong BitSizeOf(ITypeRef typeRef)
Parameters
typeRef
ITypeRefType to retrieve the size of
Returns
- ulong
Size of the type in bits
Remarks
This method determines the bit size of a type (e.g. the minimum number of bits required to represent any value of the given type.) This is distinct from the storage and stack size due to various target alignment requirements.