Sdílet prostřednictvím


WindowsIdentity.Owner Vlastnost

Definice

Získá identifikátor zabezpečení (SID) pro vlastníka tokenu.

public:
 property System::Security::Principal::SecurityIdentifier ^ Owner { System::Security::Principal::SecurityIdentifier ^ get(); };
public System.Security.Principal.SecurityIdentifier? Owner { get; }
public System.Security.Principal.SecurityIdentifier Owner { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public System.Security.Principal.SecurityIdentifier Owner { get; }
member this.Owner : System.Security.Principal.SecurityIdentifier
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.Owner : System.Security.Principal.SecurityIdentifier
Public ReadOnly Property Owner As SecurityIdentifier

Hodnota vlastnosti

Objekt pro vlastníka tokenu.

Atributy

Příklady

Následující příklad kódu ukazuje použití Owner vlastnosti k zobrazení identifikátoru zabezpečení pro vlastníka tokenu. Tento příklad kódu je součástí většího příkladu poskytnutého pro třídu .WindowsIdentity

// Display the SID for the owner.
Console.Write("The SID for the owner is : ");
SecurityIdentifier si = windowsIdentity.Owner;
Console.WriteLine(si.ToString());
' Display the SID for the owner.
Console.Write("The SID for the owner is : ")
Dim si As SecurityIdentifier
si = windowsIdentity.Owner
Console.WriteLine(si.ToString())

Poznámky

Identifikátor SID jednoznačně identifikuje uživatele nebo skupinu ve všech implementacích systém Windows NT. Vrácený identifikátor SID identifikuje výchozí identifikátor SID vlastníka, který se použije u nově vytvořených objektů.

Platí pro