Sets a property to the specified value.
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
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
| Exception | Condition |
|---|---|
| ConfigurationErrorsException | Occurs if the element is read-only or ignoreLocks is true but the locks cannot be ignored. |
Platforms
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.