ConnectionCredential.GetHashCode 方法

定義

傳回連接認證的雜湊碼。

public:
 override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

傳回

物件的雜湊碼 ConnectionCredential

範例

下列範例會計算雜湊程式碼。

public override int GetHashCode() {
    if (UseSystemAccount) {
        return UseSystemAccount.GetHashCode();
    } else {
        return String.Concat(Domain, Password, UserName,
            UseBasicAuthentication.ToString()).GetHashCode();
    }
} 

適用於