WindowsIdentity.IsSystem 屬性

定義

取得值,指出使用者帳戶是否由系統識別為 System 帳戶。

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

屬性值

Boolean

如果使用者帳戶是 System 帳戶,則為 true;否則為 false

範例

下列程式碼示範 IsSystem 如何使用屬性來傳回值,指出系統是否將使用者帳戶識別為 System 帳戶。 這個程式碼範例是針對類別提供之較大範例的一部分 WindowsIdentity

if ( windowsIdentity->IsSystem )
{
   propertyDescription = String::Concat( propertyDescription, ", is a System account" );
}
if (windowsIdentity.IsSystem)
{
    propertyDescription += ", is a System account";
}
If (windowsIdentity.IsSystem) Then
    propertyDescription += ", is a System account"
End If

適用於