Skip to content

Instantly share code, notes, and snippets.

@wim-beck
Last active March 2, 2017 08:14
Show Gist options
  • Save wim-beck/c39f1575734e57a102bbb4e017559424 to your computer and use it in GitHub Desktop.
Save wim-beck/c39f1575734e57a102bbb4e017559424 to your computer and use it in GitHub Desktop.
Get current user in C#
string currentUserName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment