NameValueConfigurationCollection.Item[String] プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定されたパラメーターに基づいて 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 プロパティを使用します。