comp • gb • object • sizeof

Object.SizeOf (gb)

Static Function SizeOf ( Object As Object ) As Integer

Return the memory used by an existant object in bytes.

Example

Public Struct EmployeeStruct
  Name As String
  Age As Integer
End Struct

Dim hEmp As New EmployeeStruct

hEmp.Name = "BenoĆ®t Minisini"
hEmp.Age = 42

Print Object.SizeOf(hEmp)