static int GetManagedSize( System.Type t )

Summary

Get the managed size of a given type. This matches an IL-level sizeof(t), even if it cannot be determined normally in C#. Note that ['c'] when t is char or bool.

Remarks

An IL-level ['c'] will return ['c'] for reference types, as it refers to the size on stack or in an object, not the size on heap.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.