Have you tried: System.Runtime.InteropServices.Marshal.SizeOf(yourObj) ?
This is not exactly what you are looking for but can give you an idea.
There's no supported way of determining the size of a managed object, except
if it is a value type. Then you can use the sizeof C# operator.