Extensions methods for Id class, that are null friendly (i.e. a call on a null reference returns.

C# | Visual Basic | Visual C++ |
public static class IdExtensions
<ExtensionAttribute> _ Public NotInheritable Class IdExtensions
[ExtensionAttribute] public ref class IdExtensions abstract sealed

All Members | Methods | ||||
Icon | Member | Description |
---|---|---|
![]() ![]() | SafeAutorelease<(Of <<'(T>)>>)(T) | Performs a safe autorelease operation on the given instance. The equivalent code is: ![]() if (instance != null) instance.Release(); return instance; |
![]() ![]() | SafeCastAs<(Of <<'(TInstance>)>>)(Id) |
Try to cast the current instance to the given type. The cast is dynamically tested for safety.
|
![]() ![]() | SafeCastTo<(Of <<'(TInstance>)>>)(Id) |
Cast the current instance to the given type. the cast is dynamically tested for safety
|
![]() ![]() | SafeRelease(Id) | Performs a safe release operation on the given instance. The equivalent code is: ![]() if (instance != null) instance.Release(); |
![]() ![]() | SafeRetain<(Of <<'(T>)>>)(T) | Performs a safe retain operation on the given instance. The equivalent code is: ![]() if (instance != null) instance.Retain(); return instance; |

Object | |
![]() | IdExtensions |

- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)