Casts an instance to the given type.
Declaration Syntax
C# | Visual Basic | Visual 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
public: generic<typename T> where T : ref class, IManagedWrapper static T CastAs( Id^ instance )
Generic Template Parameters
- T
- The parametric type.
Parameters
- 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)