İngilizce dilinde oku

Aracılığıyla paylaş


WindowsAccountType Sabit listesi

Tanım

Kullanılan Windows hesabının türünü belirtir.

C#
public enum WindowsAccountType
C#
[System.Serializable]
public enum WindowsAccountType
C#
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum WindowsAccountType
C#
[System.Runtime.InteropServices.ComVisible(true)]
public enum WindowsAccountType
Devralma
WindowsAccountType
Öznitelikler

Alanlar

Name Değer Description
Anonymous 3

Anonim bir hesap.

Guest 1

Bir Windows konuk hesabı.

Normal 0

Standart bir kullanıcı hesabı.

System 2

Bir Windows sistem hesabı.

Örnekler

Aşağıdaki örnekte, belirtilen Windows hesap belirteci, belirtilen kimlik doğrulama türü ve belirtilen Windows hesap türü ile temsil edilen kullanıcı için sınıfının yeni bir örneğini WindowsIdentity oluşturmak için oluşturucunun nasıl kullanılacağı WindowsIdentity gösterilmektedir. Bu kod örneği, sınıfı için WindowsIdentity sağlanan daha büyük bir örneğin parçasıdır.

C#
private static void IntPtrStringTypeConstructor(IntPtr logonToken)
{
    // Construct a WindowsIdentity object using the input account token,
    // and the specified authentication type, and Windows account type.
    string authenticationType = "WindowsAuthentication";
    WindowsAccountType guestAccount = WindowsAccountType.Guest;
    WindowsIdentity windowsIdentity =
        new WindowsIdentity(logonToken, authenticationType, guestAccount);

    Console.WriteLine("Created a Windows identity object named " +
        windowsIdentity.Name + ".");
}

Açıklamalar

WindowsAccountType Numaralandırma sınıfı tarafından WindowsIdentity kullanılır.

Şunlara uygulanır

Ürün Sürümler
.NET 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0
Windows Desktop 3.0, 3.1, 5