WindowsIdentity.Owner 屬性

定義

取得語彙基元擁有人的安全識別項 (SID)。

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

屬性值

SecurityIdentifier

語彙基元擁有人的物件。

屬性

範例

下列程式碼範例顯示 Owner 如何使用屬性來顯示權杖擁有者的安全識別碼。 這個程式碼範例是針對類別提供之較大範例的一部分。 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())

備註

SID 可唯一識別所有 Windows NT 執行的使用者或群組。 傳回的 SID 會識別將套用至新建立之物件的預設擁有者 SID。

適用於