Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Marshal.SizeOf Method

Returns the unmanaged size, in bytes, of a class using Marshal.

Overload List

Returns the unmanaged size of an object in bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function SizeOf(Object) As Integer
[C#] public static int SizeOf(object);
[C++] public: static int SizeOf(Object*);
[JScript] public static function SizeOf(Object) : int;

Returns the size of an unmanaged type in bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function SizeOf(Type) As Integer
[C#] public static int SizeOf(Type);
[C++] public: static int SizeOf(Type*);
[JScript] public static function SizeOf(Type) : int;

See Also

Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace

Show:
© 2015 Microsoft