KeyValueConfigurationCollection.Add Metoda

Definicja

KeyValueConfigurationElement Dodaje obiekt do kolekcji.

Przeciążenia

Add(KeyValueConfigurationElement)

KeyValueConfigurationElement Dodaje obiekt do kolekcji na podstawie podanych parametrów.

Add(String, String)

KeyValueConfigurationElement Dodaje obiekt do kolekcji na podstawie podanych parametrów.

Add(KeyValueConfigurationElement)

Źródło:
KeyValueConfigurationCollection.cs
Źródło:
KeyValueConfigurationCollection.cs
Źródło:
KeyValueConfigurationCollection.cs

KeyValueConfigurationElement Dodaje obiekt do kolekcji na podstawie podanych parametrów.

public:
 void Add(System::Configuration::KeyValueConfigurationElement ^ keyValue);
public void Add (System.Configuration.KeyValueConfigurationElement keyValue);
member this.Add : System.Configuration.KeyValueConfigurationElement -> unit
Public Sub Add (keyValue As KeyValueConfigurationElement)

Parametry

Przykłady

W poniższym przykładzie kodu pokazano, jak używać Add metody . Ten przykład kodu jest częścią większego przykładu udostępnionego KeyValueConfigurationCollection do omówienia klasy.

// Add KeyValueConfigurationElement to collection.
config.AppSettings.Settings.Add(myAdminKeyVal);
' Add KeyValueConfigurationElement to collection.
config.AppSettings.Settings.Add(myAdminKeyVal)

Uwagi

Add Użyj metody , aby dodać nowy KeyValueConfigurationElement obiekt do kolekcji.

Dotyczy

Add(String, String)

Źródło:
KeyValueConfigurationCollection.cs
Źródło:
KeyValueConfigurationCollection.cs
Źródło:
KeyValueConfigurationCollection.cs

KeyValueConfigurationElement Dodaje obiekt do kolekcji na podstawie podanych parametrów.

public:
 void Add(System::String ^ key, System::String ^ value);
public void Add (string key, string value);
member this.Add : string * string -> unit
Public Sub Add (key As String, value As String)

Parametry

key
String

Ciąg określający klucz.

value
String

Ciąg określający wartość.

Dotyczy