MonobjcMonobjc Documented Class Library
CastAs<(Of <(<'T>)>)> Method (instance)
NamespacesMonobjcObjectiveCRuntimeCastAs<(Of <<'(T>)>>)(Id)
Casts an instance to the given type.
Declaration Syntax
C#Visual BasicVisual C++
public static T CastAs<T>(
	Id instance
where T : class, IManagedWrapper
Public Shared Function CastAs(Of T As {Class, IManagedWrapper}) ( _
	instance As Id _
) As T
generic<typename T>
where T : ref class, IManagedWrapper
static T CastAs(
	Id^ instance
Generic Template Parameters
The parametric type.
instance (Id)
The instance.
Return Value
A cast instance, or null if the cast is invalid.
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)