Retrieves the number of bytes currently thought to be allocated. A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
Dim preCreate as Long = GC.GetTotalMemory(True)
Dim postCreate as Long = GC.GetTotalMemory(True)
Console.WriteLine(postCreate - preCreate)
Returns the unmanaged size, in bytes, of a class.