I'm looking for a way to get the size of an instance of a reference type. sizeof is only for value types. Is this possible?
You need Marshal.SizeOf
Edit: This is for unsafe code, but then, so is sizeof().
2.1m questions
2.1m answers
60 comments
57.0k users