Public ReadOnly Property IsDirty As Boolean
Dim instance As ProfileBase Dim value As Boolean value = instance.IsDirty
public bool IsDirty { get; }
public: property bool IsDirty { bool get (); }
/** @property */ public boolean get_IsDirty ()
public function get IsDirty () : boolean
IsDirty 属性可由 Save 方法中的配置文件提供程序使用,以确定是否更改了由基元类型、字符串或 DateTime 对象组成的属性。已更改的属性随后将由配置文件提供程序在 Save 方法中更新。如果 AutomaticSaveEnabled 属性为 true,则会在页面执行结束时自动调用 Save 方法。
对于在 Save 方法中调用的配置文件提供程序,它无法显式确定具有自定义类类型或复杂类型(如集合)的配置文件属性是否已更改。您可以使用 ProfileAutoSaving 事件来确定某个自定义对象是否已被修改,然后继续自动保存被修改的对象,或在没有对象被修改时取消自动保存。ProfileBase 类的默认行为是:对于具有自定义或复杂类型的属性,在初次访问 IsDirty 属性时将其设置为 true。
Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。