Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Principal.​NTAccount

Assembly: System.Security.Principal.Windows

Inheritance: object → IdentityReference → NTAccount

Represents a user or group account.

Properties

public string
Value
Returns a string representation of this <see cref="T:System.Security.Principal.NTAccount" /> object.

Methods

public bool
Equals​(object o)
Returns a value that indicates whether this <see cref="T:System.Security.Principal.NTAccount" /> object is equal to a specified object.
Returns <see langword="true" /> if <paramref name="o" /> is an object with the same underlying type and value as this <see cref="T:System.Security.Principal.NTAccount" /> object; otherwise, <see langword="false" /> .
o An object to compare with this <see cref="T:System.Security.Principal.NTAccount" /> object, or <see langword="null" /> .
public int
GetHashCode​()
Serves as a hash function for the current <see cref="T:System.Security.Principal.NTAccount" /> object. The <see cref="M:System.Security.Principal.NTAccount.GetHashCode" /> method is suitable for hashing algorithms and data structures like a hash table.
Returns A hash value for the current <see cref="T:System.Security.Principal.NTAccount" /> object.
public bool
IsValidTargetType​(Type targetType)
Returns a value that indicates whether the specified type is a valid translation type for the <see cref="T:System.Security.Principal.NTAccount" /> class.
Returns <see langword="true" /> if <paramref name="targetType" /> is a valid translation type for the <see cref="T:System.Security.Principal.NTAccount" /> class; otherwise <see langword="false" /> .
targetType The type being queried for validity to serve as a conversion from <see cref="T:System.Security.Principal.NTAccount" /> . The following target types are valid: - <see cref="T:System.Security.Principal.NTAccount" /> - <see cref="T:System.Security.Principal.SecurityIdentifier" /> .
public string
ToString​()
Returns the account name, in Domain \ Account format, for the account represented by the <see cref="T:System.Security.Principal.NTAccount" /> object.
Returns The account name, in Domain \ Account format.
Translate​(Type targetType)
Translates the account name represented by the <see cref="T:System.Security.Principal.NTAccount" /> object into another <see cref="T:System.Security.Principal.IdentityReference" /> -derived type.
Returns The converted identity.
targetType The target type for the conversion from <see cref="T:System.Security.Principal.NTAccount" /> . The target type must be a type that is considered valid by the <see cref="M:System.Security.Principal.NTAccount.IsValidTargetType(System.Type)" /> method.
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object