简体   繁体   中英

Will Environment.UserName return the same result in Windows 7, Windows 8.x and Windows 10?

I need to get the logged in user's name in a WPF application I'm working on. I've seen this question for a few years back. But now I'm wondering about the Environment.UserName command; will it return the same result whether or not it runs on a Windows 7, Windows 8.x or Windows 10 machine?

根据MSDN ,是的,它会。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM