ConfigurationElement.SetPropertyValue(ConfigurationProperty, Object, Boolean) ConfigurationElement.SetPropertyValue(ConfigurationProperty, Object, Boolean) ConfigurationElement.SetPropertyValue(ConfigurationProperty, Object, Boolean) ConfigurationElement.SetPropertyValue(ConfigurationProperty, Object, Boolean) Method

定义

将属性设置为指定值。Sets a property to the specified value.

protected:
 void SetPropertyValue(System::Configuration::ConfigurationProperty ^ prop, System::Object ^ value, bool ignoreLocks);
protected void SetPropertyValue (System.Configuration.ConfigurationProperty prop, object value, bool ignoreLocks);
member this.SetPropertyValue : System.Configuration.ConfigurationProperty * obj * bool -> unit
Protected Sub SetPropertyValue (prop As ConfigurationProperty, value As Object, ignoreLocks As Boolean)

参数

prop
ConfigurationProperty ConfigurationProperty ConfigurationProperty ConfigurationProperty

要设置的元素属性。The element property to set.

value
Object Object Object Object

要分配给属性的值。The value to assign to the property.

ignoreLocks
Boolean Boolean Boolean Boolean

如果应忽略对属性的锁定,则为 true;否则为 falsetrue if the locks on the property should be ignored; otherwise, false.

异常

元素为只读时,或者 ignoreLockstrue 但不能忽略锁定时发生。Occurs if the element is read-only or ignoreLocks is true but the locks cannot be ignored.

适用于