Share via


WindowsIdentity.IsGuest Properti

Definisi

Mendapatkan nilai yang menunjukkan apakah akun pengguna diidentifikasi sebagai Guest akun oleh sistem.

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

Nilai Properti

true jika akun pengguna adalah Guest akun; jika tidak, false.

Contoh

Kode berikut menunjukkan penggunaan IsGuest properti untuk mengembalikan nilai yang menunjukkan apakah akun pengguna diidentifikasi sebagai Guest akun oleh sistem. Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk WindowsIdentity kelas .

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

Berlaku untuk