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

适用于