Environmenet.UserName
---------------------
Gets the user name of the person who started the current thread
the thread is "aspnet_wp.exe",so the UserName is "ASPNET",
is not my Logon System Account.
Environment.UserName 属性 [C#]请参见
Environment 类 | Environment 成员 | System 命名空间
要求
平台: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
语言
C#
C++
JScript
Visual Basic
全部显示
获取启动当前线程的人的用户名。
[Visual Basic]
Public Shared ReadOnly Property UserName As String
[C#]
public static string UserName {get;}
[C++]
public: __property static String* get_UserName();
[JScript]
public static function get UserName() : String;
属性值
启动当前线程的人登录系统所用的名称。