PrincipalContext.UserName 属性
定义
获取在构造函数的用户名参数中指定的值。Gets the value specified in the username parameter in the constructor.
public:
property System::String ^ UserName { System::String ^ get(); };
public string UserName { get; }
member this.UserName : string
Public ReadOnly Property UserName As String
属性值
用于连接到存储区的用户名, null 如果不存在用户名,则为。The username used to connect to the store, or null if no user name exists.
注解
可以通过向其传递任意一种不同格式的用户名来设置此属性。This property can be set by passing it a user name in any one of various different formats. 有关可接受的格式类型的完整列表,请参阅 此处的 ADS_NAME_TYPE_ENUM 文档。For a complete list of the acceptable types of formats, see the ADS_NAME_TYPE_ENUM documentation here.