How do I get the logged in user's window's credentials in a WPF application

后端 未结 2 888
失恋的感觉
失恋的感觉 2020-12-17 21:19

I have a little application I build that monitors tickets submitted. It basically just sits there in the corner and notifies when new tickets arrive. I need to get the per

相关标签:
2条回答
  • 2020-12-17 22:03

    Try System.Security.Principal.WindowsIdentity.GetCurrent().Name

    0 讨论(0)
  • 2020-12-17 22:19

    You're looking for the Environment.UserName property.

    You may also be looking for the Environment.UserDomainName property.

    0 讨论(0)
提交回复
热议问题