NameValueConfigurationCollection.Item[String] プロパティ

定義

指定されたパラメーターに基づいて NameValueConfigurationElement オブジェクトを取得または設定します。

public:
 property System::Configuration::NameValueConfigurationElement ^ default[System::String ^] { System::Configuration::NameValueConfigurationElement ^ get(System::String ^ name); void set(System::String ^ name, System::Configuration::NameValueConfigurationElement ^ value); };
public System.Configuration.NameValueConfigurationElement this[string name] { get; set; }
member this.Item(string) : System.Configuration.NameValueConfigurationElement with get, set
Default Public Property Item(name As String) As NameValueConfigurationElement

パラメーター

name
String

コレクションに含まれる NameValueConfigurationElement の名前。

プロパティ値

NameValueConfigurationElement オブジェクト。

次のコード例は、 Item[] プロパティの使用方法を示しています。 このコード例は、 NameValueConfigurationCollection クラスに提供されるより大きな例の一部です。

// Item property.
Console.WriteLine("Value of property 'enabled': {0}",
 myNameValConfigCollection["enabled"].Value);
' Item property.
Console.WriteLine("Value of property 'enabled': {0}", myNameValConfigCollection("enabled").Value)

注釈

Item[] パラメーターに基づいてNameValueConfigurationElement オブジェクトを取得または設定するには、name プロパティを使用します。

適用対象