Share via


NSDictionary<TKey,TValue>.ToDictionary<K,V> Method

Definition

Create an Dictionary<TKey,TValue> from this dictionary.

public System.Collections.Generic.Dictionary<K,V> ToDictionary<K,V>(Func<TKey,TValue,(K Key, V Value)> convertCallback);
member this.ToDictionary : Func<'Key, 'Value, ValueTuple<'K, 'V> (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> -> System.Collections.Generic.Dictionary<'K, 'V>

Type Parameters

K
V

Parameters

convertCallback
Func<TKey,TValue,ValueTuple<K,V>>

A callback function to convert from the type of each key and value into the type to add to the returned dictionary.

Returns

Dictionary<K,V>

Null if the collection of items is null, otherwise a new Dictionary<TKey,TValue> from this dictionary.

Applies to