語言

KeyValueConfigurationElement(String, String) 建構函式

定義

根據所提供的參數初始化類別的新實例 KeyValueConfigurationElement 。

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)

參數

key
String

該 的密鑰 KeyValueConfigurationElement。

value
String

該 的價值 KeyValueConfigurationElement。

範例

以下程式碼範例示範如何使用 KeyValueConfigurationElement 建構子。 這個程式碼範例是為類別概述提供 KeyValueConfigurationCollection 的完整範例的一部分。

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

適用於

另請參閱