NSMutableDictionary<TKey,TValue> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| NSMutableDictionary<TKey,TValue>() |
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class. |
| NSMutableDictionary<TKey,TValue>(NSCoder) |
A constructor that initializes the object from the data stored in the unarchiver object. |
| NSMutableDictionary<TKey,TValue>(NSDictionary<TKey,TValue>) |
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class from a dictionary. |
| NSMutableDictionary<TKey,TValue>(NSMutableDictionary<TKey,TValue>) |
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class from another mutable dictionary. |
| NSMutableDictionary<TKey,TValue>(TKey, TValue) |
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class with a single key-value pair. |
| NSMutableDictionary<TKey,TValue>(TKey[], TValue[]) |
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class from parallel arrays of keys and values. |
NSMutableDictionary<TKey,TValue>()
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class.
public NSMutableDictionary();
Applies to
NSMutableDictionary<TKey,TValue>(NSCoder)
A constructor that initializes the object from the data stored in the unarchiver object.
public NSMutableDictionary(Foundation.NSCoder coder);
new Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSCoder -> Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>
Parameters
- coder
- NSCoder
The unarchiver object.
Remarks
This constructor is provided to allow the class to be initialized from an unarchiver (for example, during NIB deserialization). This is part of the NSCoding protocol.
If developers want to create a subclass of this object and continue to support deserialization from an archive, they should implement a constructor with an identical signature: taking a single parameter of type NSCoder and decorate it with the [Export("initWithCoder:"] attribute declaration.
The state of this object can also be serialized by using the companion method, EncodeTo.
Applies to
NSMutableDictionary<TKey,TValue>(NSDictionary<TKey,TValue>)
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class from a dictionary.
public NSMutableDictionary(Foundation.NSDictionary<TKey,TValue> other);
new Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> -> Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>
Parameters
The dictionary to copy from.
Applies to
NSMutableDictionary<TKey,TValue>(NSMutableDictionary<TKey,TValue>)
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class from another mutable dictionary.
public NSMutableDictionary(Foundation.NSMutableDictionary<TKey,TValue> other);
new Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> -> Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>
Parameters
The mutable dictionary to copy from.
Applies to
NSMutableDictionary<TKey,TValue>(TKey, TValue)
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class with a single key-value pair.
public NSMutableDictionary(TKey key, TValue value);
public NSMutableDictionary(TKey? key, TValue? value);
new Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : 'Key * 'Value -> Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>
Parameters
- key
- TKey
The key.
- value
- TValue
The value.
Applies to
NSMutableDictionary<TKey,TValue>(TKey[], TValue[])
Initializes a new instance of the NSMutableDictionary<TKey,TValue> class from parallel arrays of keys and values.
public NSMutableDictionary(TKey[] keys, TValue[] values);
new Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : 'Key[] * 'Value[] -> Foundation.NSMutableDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>
Parameters
- keys
- TKey[]
An array of keys.
- values
- TValue[]
An array of values.