Share via


DictionaryContainer.TryGetNSObject<T>(NSString, T) Method

Definition

Returns the nullable T associated with key.

protected bool TryGetNSObject<T>(Foundation.NSString key, out T? object) where T : Foundation.NSObject;
member this.TryGetNSObject : Foundation.NSString * 'T -> bool (requires 'T :> Foundation.NSObject)

Type Parameters

T

Parameters

key
NSString

The identifier of the value to get.

object
T

The T instance that was found (or null if no value was found for the specified key).

Returns

true if the specified key was found in the dictionary, false otherwise.

Remarks

This method will throw an exception if the dictionary contains a value for the specified key that is not an T.

Applies to