WindowsIdentity.IsGuest Egenskap

Definition

Hämtar ett värde som anger om användarkontot identifieras som ett Guest konto av systemet.

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

Egenskapsvärde

trueom användarkontot är ett Guest konto, annars . false

Exempel

Följande kod visar användningen av IsGuest egenskapen för att returnera ett värde som anger om användarkontot identifieras som ett Guest konto av systemet. Det här kodexemplet är en del av ett större exempel för WindowsIdentity klassen.

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

Gäller för