MonobjcMonobjc Documented Class Library
CastTo<(Of <(<'T>)>)> Method
NamespacesMonobjcIdCastTo<(Of <<'(T>)>>)()()()()
Cast the current instance to the given type. The cast is dynamically tested for safety.
Declaration Syntax
C#Visual BasicVisual C++
public T CastTo<T>()
where T : class, IManagedWrapper
Public Function CastTo(Of T As {Class, IManagedWrapper}) As T
public:
generic<typename T>
where T : ref class, IManagedWrapper
virtual T CastTo() sealed
Generic Template Parameters
T
The type of the instance.
Return Value
The cast instance
Exceptions
ExceptionCondition
ObjectiveCClassCastExceptionIf an error occured during the cast
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)