The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Marshal::SizeOf Method
.NET Framework (current version)
Returns the unmanaged size, in bytes, of a class.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | SizeOf(Object^) | Returns the unmanaged size of an object in bytes. |
![]() ![]() | SizeOf(Type^) | Returns the size of an unmanaged type in bytes. |
![]() ![]() | SizeOf<T>() | [Supported in the .NET Framework 4.5.1 and later versions] Returns the size of an unmanaged type in bytes. |
![]() ![]() | SizeOf<T>(T) | [Supported in the .NET Framework 4.5.1 and later versions] Returns the unmanaged size of an object of a specified type in bytes. |
Show:

