MonobjcMonobjc Documented Class Library
GetTypeSize Method (type)
NamespacesMonobjcObjectiveCEncodingGetTypeSize(Type)

Return the native type size used to build selector signature. The value represents the size to use when the type is placed on the parameter stack.

Here are some examples of sizes:
TypeCorresponding size (on IA32 architecture)
bool or Boolean
1
int or Int32
4
NSString
4
NSRect
16

Declaration Syntax
C#Visual BasicVisual C++
public static int GetTypeSize(
	Type type
)
Public Shared Function GetTypeSize ( _
	type As Type _
) As Integer
public:
static int GetTypeSize(
	Type^ type
)
Parameters
type (Type)
The type to measure.
Return Value
The size value
Exceptions
ExceptionCondition
ArgumentNullExceptionIf the type is null.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc (Module: Monobjc)