GenericPrincipal.Identity 属性

定义

获取当前 GenericIdentity 表示的用户的 GenericPrincipal

public:
 virtual property System::Security::Principal::IIdentity ^ Identity { System::Security::Principal::IIdentity ^ get(); };
public override System.Security.Principal.IIdentity Identity { get; }
public virtual System.Security.Principal.IIdentity Identity { get; }
member this.Identity : System.Security.Principal.IIdentity
Public Overrides ReadOnly Property Identity As IIdentity
Public Overridable ReadOnly Property Identity As IIdentity

属性值

IIdentity

GenericIdentity 表示的用户的 GenericPrincipal

实现

示例

以下代码显示属性 Identity 的使用。 此代码示例是为类提供的大型示例的 GenericPrincipal 一部分。

GenericIdentity^ principalIdentity =
   dynamic_cast<GenericIdentity^>(genericPrincipal->Identity);
GenericIdentity principalIdentity = 
    (GenericIdentity)genericPrincipal.Identity;
Dim principalIdentity As GenericIdentity = _
    CType(genericPrincipal.Identity, GenericIdentity)

适用于