本文介绍了获取Windows名字和姓氏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过这段代码
Hi,
With this piece of code
System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
,我可以获得Windows用户ID.但不是一个人的名字和姓氏.例如,公司为员工提供了一个Windows ID,其登录名为WS0046P,因此,如果我使用我的代码行,则将获得Windows ID.
我只想接收Windows用户的名字和姓氏
在此先感谢
I can get the Windows User ID. But not the Firstname and Lastname of an person. For example, companies gives an employee a Windows ID with login name WS0046P, so if I use my line of code I will get the Windows ID.
I just want to receive the Firstname and Lastname of a Windows User
Thanks in advance
推荐答案
这篇关于获取Windows名字和姓氏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!