WindowsIdentity.IsGuest Özellik

Tanım

Kullanıcı hesabının sistem tarafından bir 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 bir hesap olarak Guest tanımlanıp tanımlanmadığını belirten bir değer döndürmek için özelliğinin kullanımını IsGuest 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