Compartir a través de


NSDictionary<TKey,TValue> Constructores

Definición

Sobrecargas

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

Constructor que inicializa el objeto a partir de los datos almacenados en el objeto unarchiver.

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 ();

Se aplica a

NSDictionary<TKey,TValue>(NSCoder)

Constructor que inicializa el objeto a partir de los datos almacenados en el objeto unarchiver.

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)>

Parámetros

coder
NSCoder

Objeto unarchiver.

Comentarios

Este constructor se proporciona para permitir que la clase se inicialice desde un archivador (por ejemplo, durante la deserialización de NIB). Esto forma parte del NSCoding protocolo.

Si los desarrolladores quieren crear una subclase de este objeto y seguir admitiendo la deserialización desde un archivo, deben implementar un constructor con una firma idéntica: tomar un único parámetro de tipo NSCoder y decorarlo con la declaración de atributo [Export("initWithCoder:"].

El estado de este objeto también se puede serializar mediante el método complementario EncodeTo.

Se aplica a

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)>

Parámetros

Se aplica a

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)>

Parámetros

url
NSUrl

Se aplica a

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)>

Parámetros

filename
String

Se aplica a

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)>

Parámetros

key
TKey
value
TValue

Se aplica a

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)>

Parámetros

keys
TKey[]
values
TValue[]

Se aplica a