Creates a WindowsIdentity object representing the current Windows user.
[Visual Basic] Public Shared Function GetCurrent() As WindowsIdentity [C#] public static WindowsIdentity GetCurrent(); [C++] public: static WindowsIdentity* GetCurrent(); [JScript] public static function GetCurrent() : WindowsIdentity;
A WindowsIdentity object representing the current user.
[C#]
WindowsIdentity wi = WindowsIdentity.GetCurrent();
WindowsIdentity Class | WindowsIdentity Members | System.Security.Principal Namespace