C#/XAML for HTML5 Documentation
C#/XAML for HTML5 Documentation
Reference
System.Runtime.InteropServices
Marshal Class
Marshal Methods
SizeOf Method
SizeOf Method (Object)
SizeOf Method (Type)
Marshal
SizeOf Method (Type)
Returns the size of an unmanaged type in bytes.
Namespace:
System.Runtime.InteropServices
Assembly:
mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
Copy
public
static
int
SizeOf
(
Type
t
)
Parameters
t
Type:
System
Type
The type whose size is to be returned.
Return Value
Type:
Int32
The size of the specified type in unmanaged code.
Exceptions
Exception
Condition
ArgumentException
The
t
parameter is a generic type.
ArgumentNullException
The
t
parameter is null.
See Also
Reference
Marshal Class
SizeOf Overload
System.Runtime.InteropServices Namespace