Bewerken

Delen via


NSDictionary<TKey,TValue> Constructors

Definition

Overloads

NSDictionary<TKey,TValue>()
NSDictionary<TKey,TValue>(NSCoder)

A constructor that initializes the object from the data stored in the unarchiver object.

NSDictionary<TKey,TValue>(NSDictionary<TKey,TValue>)
NSDictionary<TKey,TValue>(NSUrl)
NSDictionary<TKey,TValue>(String)
NSDictionary<TKey,TValue>(TKey, TValue)
NSDictionary<TKey,TValue>(TKey[], TValue[])

NSDictionary<TKey,TValue>()

public NSDictionary ();

Applies to

NSDictionary<TKey,TValue>(NSCoder)

A constructor that initializes the object from the data stored in the unarchiver object.

public NSDictionary (Foundation.NSCoder coder);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSCoder -> Foundation.NSDictionary<'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

NSDictionary<TKey,TValue>(NSDictionary<TKey,TValue>)

public NSDictionary (Foundation.NSDictionary<TKey,TValue> other);
new Foundation.NSDictionary<'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.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parameters

Applies to

NSDictionary<TKey,TValue>(NSUrl)

public NSDictionary (Foundation.NSUrl url);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSUrl -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parameters

url
NSUrl

Applies to

NSDictionary<TKey,TValue>(String)

public NSDictionary (string filename);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : string -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parameters

filename
String

Applies to

NSDictionary<TKey,TValue>(TKey, TValue)

public NSDictionary (TKey key, TValue value);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : 'Key * 'Value -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parameters

key
TKey
value
TValue

Applies to

NSDictionary<TKey,TValue>(TKey[], TValue[])

public NSDictionary (TKey[] keys, TValue[] values);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : 'Key[] * 'Value[] -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parameters

keys
TKey[]
values
TValue[]

Applies to