Share via


WindowsIdentity.IsGuest Özellik

Tanım

Kullanıcı hesabının sistem tarafından hesap olarak tanımlanıp tanımlanmadığını belirten bir Guest değer alır.

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

Özellik Değeri

true kullanıcı hesabı bir Guest hesapsa; değilse, false.

Örnekler

Aşağıdaki kod, kullanıcı hesabının sistem tarafından hesap olarak Guest tanımlanıp tanımlanmadığını IsGuest belirten bir değer döndürmek için özelliğinin kullanımını gösterir. Bu kod örneği, sınıfı için WindowsIdentity sağlanan daha büyük bir örneğin parçasıdır.

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

Şunlara uygulanır