IIdentity.Name 属性

定义

获取当前用户的名称。Gets the name of the current user.

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

属性值

用户名,代码当前即以该用户的名义运行。The name of the user on whose behalf the code is running.

注解

操作系统或其他身份验证提供程序(如 ASP.NET)将用户名传递到公共语言运行时。The user name is passed to the common language runtime by the operating system or other authentication provider (such as ASP.NET).

对于未经身份验证的实体,Name 通常设置为空字符串(""),但可以采用其他值。Name is typically set to an empty string ("") for an unauthenticated entity, but can take other values.

适用于