言語

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)

適用対象