WindowsAccountType Enumeration

 

Specifies the type of Windows account used.

Namespace:   System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)

<SerializableAttribute>
<ComVisibleAttribute(True)>
Public Enumeration WindowsAccountType

Member nameDescription
Anonymous

An anonymous account.

Guest

A Windows guest account.

Normal

A standard user account.

System

A Windows system account.

The WindowsAccountType enumeration is used by the WindowsIdentity class.

The following example shows how to use the WindowsIdentity constructor to create a new instance of the WindowsIdentity class for the user represented by the specified Windows account token, the specified authentication type, and the specified Windows account type. This code example is part of a larger example provided for the WindowsIdentity class.

Private Sub IntPtrStringTypeConstructor(ByVal logonToken As IntPtr)
    ' Construct a WindowsIdentity object using the input account token,
    ' and the specified authentication type and Windows account type.
    Dim authenticationType As String = "WindowsAuthentication"
    Dim guestAccount As WindowsAccountType = WindowsAccountType.Guest
    Dim windowsIdentity As _
        New WindowsIdentity(logonToken, authenticationType, guestAccount)

    WriteLine("Created a Windows identity object named " + _
        windowsIdentity.Name + ".")
End Sub

.NET Framework
Available since 1.1
Return to top
Show: