WindowsPrincipal(WindowsIdentity) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the WindowsPrincipal class by using the specified WindowsIdentity object.
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)
Parameters
- ntIdentity
- WindowsIdentity
The object from which to construct the new instance of WindowsPrincipal.
Exceptions
ntIdentity
is null
.
Examples
The following example creates a new WindowsPrincipal object from the current WindowsIdentity object.
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)
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.