IPersistableObjectSetProperty Method

Sets the property to specified value.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
bool SetProperty(
	string propertyName,
	Object? value,
	bool triggerChangedEvent = true
)

Parameters

propertyName  String
The name of the property to set.
value  Object
The value to set.
triggerChangedEvent  Boolean  (Optional)
to allow raising the PropertyChanged event; otherwise, . This parameter is optional.
Default value: .

Return Value

Boolean
if property has been set (change occurred); otherwise, .

Exceptions

InvalidOperationExceptionCannot set the property.

See Also