Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WindowsPrincipal Constructor (WindowsIdentity^)

 

Initializes a new instance of the WindowsPrincipal class by using the specified WindowsIdentity object.

Namespace:   System.Security.Principal
Assembly:  mscorlib (in mscorlib.dll)

public:
WindowsPrincipal(
	WindowsIdentity^ ntIdentity
)

Parameters

ntIdentity
Type: System.Security.Principal::WindowsIdentity^

The object from which to construct the new instance of WindowsPrincipal.

Exception Condition
ArgumentNullException

ntIdentity is null.

The following example creates a new WindowsPrincipal object from the current WindowsIdentity object.

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft