ObservableObjectBaseClone Method

Creates a new object that is a copy of the current instance.
The base implementation clones the internal property storage, the IsModified property and if clonePropertyChanged is , then also the subscribers of the PropertyChanged event. It respects the implementations with some special handling for arrays so arrays can be deep-cloned as well.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public virtual ObservableObjectBase Clone(
	bool clonePropertyChanged = false
)

Parameters

clonePropertyChanged  Boolean  (Optional)
to clone also the subscribers of the PropertyChanged event; otherwise, . This parameter is optional.
Default value: .

Return Value

ObservableObjectBase
A new object that is a copy of this instance.

See Also