[英]What would Environment.UserName return when used in a Windows Service
[英]Will Environment.UserName return the same result in Windows 7, Windows 8.x and Windows 10?
我需要在我正在處理的WPF應用程序中獲取登錄用戶的名稱。 幾年前我見過這個問題 。 但現在我想知道Environment.UserName命令; 無論它是否在Windows 7,Windows 8.x或Windows 10計算機上運行,它都會返回相同的結果嗎?
根據MSDN ,是的,它會。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.