How to get size of an object of a class/struct in C#.
hello h = new hello();
Base b = new Base();
Console.Write(Marshal.SizeOf(h) + "," + Marshal.SizeOf(b));
Console.Read();
I tried above code, but it gives error. ERROR:
Type 'Virtual.Base' cannot be marshaled as an unmanaged structure; no meaningful size or offset can be computed.
THanks!