WindowsPrincipal(WindowsIdentity) 생성자

정의

지정된 WindowsPrincipal 개체를 사용하여 WindowsIdentity 클래스의 새 인스턴스를 초기화합니다.

public:
 WindowsPrincipal(System::Security::Principal::WindowsIdentity ^ ntIdentity);
public WindowsPrincipal(System.Security.Principal.WindowsIdentity ntIdentity);
new System.Security.Principal.WindowsPrincipal : System.Security.Principal.WindowsIdentity -> System.Security.Principal.WindowsPrincipal
Public Sub New (ntIdentity As WindowsIdentity)

매개 변수

ntIdentity
WindowsIdentity

WindowsPrincipal새 인스턴스를 생성할 개체입니다.

예외

ntIdentitynull입니다.

예제

다음 예제에서는 현재 WindowsPrincipal 개체에서 새 WindowsIdentity 개체를 만듭니다.

WindowsIdentity^ wi = WindowsIdentity::GetCurrent();
WindowsPrincipal^ wp = gcnew WindowsPrincipal( wi );

WindowsIdentity wi = WindowsIdentity.GetCurrent();
WindowsPrincipal wp = new WindowsPrincipal(wi);

Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent()
Dim wp As New WindowsPrincipal(wi)

적용 대상