Freezable.CanFreeze Property


获取一个值,该值指示是否可将对象变为不可修改。Gets a value that indicates whether the object can be made unmodifiable.

 property bool CanFreeze { bool get(); };
public bool CanFreeze { get; }
member this.CanFreeze : bool
Public ReadOnly Property CanFreeze As Boolean

Property Value


如果当前对象可以变为不可修改,或者已经不可修改,则为 true;否则为 falsetrue if the current object can be made unmodifiable or is already unmodifiable; otherwise, false.

Notes to Inheritors

此方法实现使用 FreezeCore(Boolean) 方法,并将 isChecking 设置为 true,以确定是否可将 Freezable 变为不可修改。This method implementation uses the FreezeCore(Boolean) method with isChecking set to true to determine whether a Freezable can be made unmodifiable. 若要修改此属性在派生类中的行为方式,请重写 FreezeCore(Boolean) 方法。To modify the way this property behaves in a derived class, override the FreezeCore(Boolean) method.

Applies to