static int GetManagedSize (System.Type t)

Remarks

An IL-level sizeof(t) will return sizeof(IntPtr) for reference types, as it refers to the size on stack or in an object, not the size on heap.

Parameters

NameTypeDescription
t System.Type

Returns

TypeDescription
int
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.