ObservableObjectBaseIsDisposed Property

Gets whether this instance has already been disposed.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
protected bool IsDisposed { get; }

Property Value

Boolean

Remarks

Properties accessed by the Get<T> and Set methods throw an ObjectDisposedException when this property returns (but see also the AllowReadingDisposedObject property).

If the Dispose(Boolean) method is overridden and you need to dispose properties accessed by the Get<T> and Set methods check this property first to prevent the ObjectDisposedException.

See Also