NTAccount 類別

定義

代表使用者或群組帳戶。Represents a user or group account.

public ref class NTAccount sealed : System::Security::Principal::IdentityReference
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class NTAccount : System.Security.Principal.IdentityReference
type NTAccount = class
    inherit IdentityReference
Public NotInheritable Class NTAccount
Inherits IdentityReference
繼承
屬性

建構函式

NTAccount(String)

使用指定的名稱,初始化 NTAccount 類別的新執行個體。Initializes a new instance of the NTAccount class by using the specified name.

NTAccount(String, String)

使用指定的網域名稱和帳戶名稱,初始化 NTAccount 類別的新執行個體。Initializes a new instance of the NTAccount class by using the specified domain name and account name.

屬性

Value

傳回這個 NTAccount 物件的字串表示。Returns a string representation of this NTAccount object.

方法

Equals(Object)

傳回值,指出這個 NTAccount 物件是否等於指定的物件。Returns a value that indicates whether this NTAccount object is equal to a specified object.

GetHashCode()

做為目前 NTAccount 物件的雜湊函式。Serves as a hash function for the current NTAccount object. GetHashCode() 方法適用於雜湊演算法和雜湊資料表這類的資料結構。The GetHashCode() method is suitable for hashing algorithms and data structures like a hash table.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IsValidTargetType(Type)

傳回值,指出指定型別是否為 NTAccount 類別的有效轉譯型別。Returns a value that indicates whether the specified type is a valid translation type for the NTAccount class.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回 NTAccount 物件所表示的帳戶之帳戶名稱,格式為 Domain \ AccountReturns the account name, in Domain \ Account format, for the account represented by the NTAccount object.

Translate(Type)

NTAccount 物件所表示的帳戶名稱轉譯為另一個 IdentityReference 衍生型別。Translates the account name represented by the NTAccount object into another IdentityReference-derived type.

運算子

Equality(NTAccount, NTAccount)

比較兩個 NTAccount 物件,判斷它們是否相等。Compares two NTAccount objects to determine whether they are equal. 如果它們的正式名稱表示與 Value 屬性所傳回的相同,或兩者都是 null,則會將它們視為相等。They are considered equal if they have the same canonical name representation as the one returned by the Value property or if they are both null.

Inequality(NTAccount, NTAccount)

比較兩個 NTAccount 物件,判斷它們是否不相等。Compares two NTAccount objects to determine whether they are not equal. 如果它們的正式名稱表示與 Value 屬性所傳回的不同,或其中一個物件為 null 而另一個不是,則會將它們視為不相等。They are considered not equal if they have different canonical name representations than the one returned by the Value property or if one of the objects is null and the other is not.

適用於