SecurityIdentifier.CompareTo(SecurityIdentifier) 方法

定義

將目前的 SecurityIdentifier 物件與指定的 SecurityIdentifier 物件相比較。Compares the current SecurityIdentifier object with the specified SecurityIdentifier object.

public:
 virtual int CompareTo(System::Security::Principal::SecurityIdentifier ^ sid);
public int CompareTo (System.Security.Principal.SecurityIdentifier sid);
abstract member CompareTo : System.Security.Principal.SecurityIdentifier -> int
override this.CompareTo : System.Security.Principal.SecurityIdentifier -> int
Public Function CompareTo (sid As SecurityIdentifier) As Integer

參數

sid
SecurityIdentifier

要與目前物件比較的物件。The object to compare with the current object.

傳回

帶正負號的數字,指出這個執行個體與 sid 的相對值。A signed number indicating the relative values of this instance and sid.

傳回值Return Value 描述Description
小於零 (0)Less than zero 這個執行個體小於 sidThis instance is less than sid.
Zero 這個執行個體等於 sidThis instance is equal to sid.
大於零 (0)Greater than zero 這個執行個體大於 sidThis instance is greater than sid.

實作

適用於