ConfigurationElement.SetPropertyValue(ConfigurationProperty, Object, Boolean) 方法

定義

將屬性設定為指定的值。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

要設定的項目屬性。The element property to set.

value
Object

要指派給屬性的值。The value to assign to the property.

ignoreLocks
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.

適用於