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 使用します。

適用対象