ConfigurationElement.SetPropertyValue 方法

定義

將屬性設定為指定的值。

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

要設定的項目屬性。

value
Object

要指派給屬性的值。

ignoreLocks
Boolean

如果應該忽略屬性上的鎖定,則為 true,否則為 false

例外狀況

會在此項目是唯讀時發生,或在 ignoreLockstrue 但卻不能忽略鎖定時發生。

適用於