Share via


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

屬性值

如果使用者帳戶是 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

適用於