KeyValueConfigurationElement(String, String) Konstruktor

Definicja

Inicjuje KeyValueConfigurationElement nowe wystąpienie klasy na podstawie podanych parametrów.

public:
 KeyValueConfigurationElement(System::String ^ key, System::String ^ value);
public KeyValueConfigurationElement (string key, string value);
new System.Configuration.KeyValueConfigurationElement : string * string -> System.Configuration.KeyValueConfigurationElement
Public Sub New (key As String, value As String)

Parametry

value
String

Wartość elementu KeyValueConfigurationElement.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać konstruktora KeyValueConfigurationElement . Ten przykład kodu jest częścią większego przykładu podanego KeyValueConfigurationCollection na potrzeby przeglądu klasy.

// Create the KeyValueConfigurationElement.
KeyValueConfigurationElement myAdminKeyVal = 
  new KeyValueConfigurationElement(
  "myAdminTool", "admin.aspx");
' Create the KeyValueConfigurationElement.
Dim myAdminKeyVal As KeyValueConfigurationElement = _
  New KeyValueConfigurationElement _
  ("myAdminTool", "admin.aspx")

Dotyczy

Zobacz też