KeyValueConfigurationElement(String, String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
根據所提供的參數初始化類別的新實例 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")