WindowsPrincipal Constructor (WindowsIdentity)
.NET Framework (current version)
Initializes a new instance of the WindowsPrincipal class by using the specified WindowsIdentity object.
Assembly: mscorlib (in mscorlib.dll)
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.
.NET Framework
Available since 1.1
Available since 1.1
Show: