MonobjcMonobjc Documented Class Library
CastAs<(Of <(<'T>)>)> Method
NamespacesMonobjcIdCastAs<(Of <<'(T>)>>)()()()()
Try to cast the current instance to the given type. The cast is dynamically tested for safety.
Declaration Syntax
C#Visual BasicVisual C++
public T CastAs<T>()
where T : class, IManagedWrapper
Public Function CastAs(Of T As {Class, IManagedWrapper}) As T
generic<typename T>
where T : ref class, IManagedWrapper
virtual T CastAs() sealed
Generic Template Parameters
The type of the instance.
Return Value
The cast instance or null if the cast is not valid
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)