snippetcsharpCritical
How do I get the current username in .NET using C#?
Viewed 0 times
usernamenethowthecurrentusingget
Problem
How do I get the current username in .NET using C#?
Solution
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;Code Snippets
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;Context
Stack Overflow Q#1240373, score: 1078
Revisions (0)
No revisions yet.