ConfigurationElement.Item[] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置此 ConfigurationElement 对象的属性 (Property)、属性 (Attribute) 或子元素。
重载
Item[ConfigurationProperty] |
获取或设置此配置元素的属性或特性。 |
Item[String] |
获取或设置此配置元素的属性、特性或子元素。 |
注解
使用此方法获取或设置对象的值 ConfigurationProperty 。
Item[ConfigurationProperty]
获取或设置此配置元素的属性或特性。
protected:
property System::Object ^ default[System::Configuration::ConfigurationProperty ^] { System::Object ^ get(System::Configuration::ConfigurationProperty ^ prop); void set(System::Configuration::ConfigurationProperty ^ prop, System::Object ^ value); };
protected public:
property System::Object ^ default[System::Configuration::ConfigurationProperty ^] { System::Object ^ get(System::Configuration::ConfigurationProperty ^ prop); void set(System::Configuration::ConfigurationProperty ^ prop, System::Object ^ value); };
protected public:
property System::Object ^ default[System::Configuration::ConfigurationProperty ^] { System::Object ^ get(System::Configuration::ConfigurationProperty ^ property); void set(System::Configuration::ConfigurationProperty ^ property, System::Object ^ value); };
protected object this[System.Configuration.ConfigurationProperty prop] { get; set; }
protected internal object this[System.Configuration.ConfigurationProperty prop] { get; set; }
protected internal object this[System.Configuration.ConfigurationProperty property] { get; set; }
member this.Item(System.Configuration.ConfigurationProperty) : obj with get, set
Default Protected Property Item(prop As ConfigurationProperty) As Object
Default Protected Friend Property Item(prop As ConfigurationProperty) As Object
Default Protected Friend Property Item(property As ConfigurationProperty) As Object
参数
- propproperty
- ConfigurationProperty
要访问的属性。
属性值
指定的属性、特性或子元素。
例外
prop
为 null
或不存在于元素中。
prop
为只读或被锁定。
注解
使用属性 Item[] 获取或设置对象的值 ConfigurationProperty 。
在 C# 中,此属性是 ConfigurationSectionCollection 类的索引器。
适用于
Item[String]
获取或设置此配置元素的属性、特性或子元素。
protected:
property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ propertyName); void set(System::String ^ propertyName, System::Object ^ value); };
protected public:
property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ propertyName); void set(System::String ^ propertyName, System::Object ^ value); };
protected public:
property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ property_name); void set(System::String ^ property_name, System::Object ^ value); };
protected object this[string propertyName] { get; set; }
protected internal object this[string propertyName] { get; set; }
protected internal object this[string property_name] { get; set; }
member this.Item(string) : obj with get, set
Default Protected Property Item(propertyName As String) As Object
Default Protected Friend Property Item(propertyName As String) As Object
Default Protected Friend Property Item(property_name As String) As Object
参数
- propertyNameproperty_name
- String
要访问的 ConfigurationProperty 的名称。
属性值
指定的属性、特性或子元素。
例外
prop
为只读或被锁定。
注解
使用属性 Item[] 获取或设置对象的值 ConfigurationProperty 。
在 C# 中,此属性是 ConfigurationSectionCollection 类的索引器。