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?
If you can - Serialize it!
Dim myObjectSize As Long Dim ms As New IO.MemoryStream Dim bf As New Runtime.Serialization.Formatters.Binary.BinaryFormatter() bf.Serialize(ms, myObject) myObjectSize = ms.Position