WindowsPrincipal(WindowsIdentity) 생성자

정의

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

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의 새 인스턴스를 만들 개체입니다.

예외

ntIdentity이(가) null인 경우

예제

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

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)

적용 대상