.NET Framework Class Library
ConfigurationElementSetPropertyValue Method

Sets a property to the specified value.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)
Syntax
Protected Sub SetPropertyValue ( _
	prop As [%$TOPIC/ms224426_en-us_VS_110_1_0_0_0_0%], _
	value As [%$TOPIC/ms224426_en-us_VS_110_1_0_0_0_1%], _
	ignoreLocks As [%$TOPIC/ms224426_en-us_VS_110_1_0_0_0_2%] _
)
protected void SetPropertyValue(
	[%$TOPIC/ms224426_en-us_VS_110_1_0_1_0_0%] prop,
	[%$TOPIC/ms224426_en-us_VS_110_1_0_1_0_1%] value,
	[%$TOPIC/ms224426_en-us_VS_110_1_0_1_0_2%] ignoreLocks
)
protected:
void SetPropertyValue(
	[%$TOPIC/ms224426_en-us_VS_110_1_0_2_0_0%]^ prop, 
	[%$TOPIC/ms224426_en-us_VS_110_1_0_2_0_1%]^ value, 
	[%$TOPIC/ms224426_en-us_VS_110_1_0_2_0_2%] ignoreLocks
)
member SetPropertyValue : 
        prop:[%$TOPIC/ms224426_en-us_VS_110_1_0_3_0_0%] * 
        value:[%$TOPIC/ms224426_en-us_VS_110_1_0_3_0_1%] * 
        ignoreLocks:[%$TOPIC/ms224426_en-us_VS_110_1_0_3_0_2%] -> unit
protected function SetPropertyValue(
	prop : [%$TOPIC/ms224426_en-us_VS_110_1_0_4_0_0%], 
	value : [%$TOPIC/ms224426_en-us_VS_110_1_0_4_0_1%], 
	ignoreLocks : [%$TOPIC/ms224426_en-us_VS_110_1_0_4_0_2%]
)

Parameters

prop
Type: System.ConfigurationConfigurationProperty

The element property to set.

value
Type: SystemObject

The value to assign to the property.

ignoreLocks
Type: SystemBoolean

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

Exceptions
ExceptionCondition
ConfigurationErrorsException

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

Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1