Returns the size, in bytes, of a class used via PInvoke as an argument to a native function
[Visual Basic] Overloads Public Shared Function SizeOf( _ ByVal structure As Object _ ) As Integer [C#] public static int SizeOf( object structure ); [C++] public: static int SizeOf( Object* structure ); [JScript] public static function SizeOf( structure : Object ) : int;
Size of specified object.
Exception Type | Condition |
---|---|
System.Runtime.InteropServices.ArgumentException | if cls is not a Marshal Class. |
System.Runtime.InteropServices.NullReferenceException | if cls is null. |
Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace | Marshal.SizeOf Overload List