ConfigurationElementSetPropertyValue Method
 

Sets a property to the specified value.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

Syntax
protected void SetPropertyValue(
	ConfigurationProperty prop,
	object value,
	bool ignoreLocks
)
protected:
void SetPropertyValue(
	ConfigurationProperty^ prop,
	Object^ value,
	bool ignoreLocks
)
member SetPropertyValue : 
        prop:ConfigurationProperty *
        value:Object *
        ignoreLocks:bool -> unit
Protected Sub SetPropertyValue (
	prop As ConfigurationProperty,
	value As Object,
	ignoreLocks As Boolean
)

Parameters

prop
Type:

The element property to set.

value
Type:

The value to assign to the property.

ignoreLocks
Type:

true if the locks on the property should be ignored; otherwise, false.

Exceptions
Exception Condition
ConfigurationErrorsException

Occurs if the element is read-only or ignoreLocks is true but the locks cannot be ignored.

Version Information
.NET Framework
Available since 2.0
Return to top