How do I get the current username in .NET using C#?
Use System.Windows.Forms.SystemInformation.UserName for the actually logged in user as Environment.UserName still returns the account being used by the current process.
System.Windows.Forms.SystemInformation.UserName
Environment.UserName