//Declare the Header File
using System.Security.Principal;
string a;
a=System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
//Above Statement,opens us up to more than just the current user.
MessageBox.Show(a.ToString());
GET THE USER NAME IN C# FOR NT AUTHENTICATION
Posted by
Geeks
Labels:
C#
Subscribe to:
Post Comments (Atom)
Post a Comment