System.Security.Principal.SecurityIdentifier Members

The members of System.Security.Principal.SecurityIdentifier are listed below.

See Also: Inherited members from System.Security.Principal.IdentityReference

Public Constructors

Initializes a new instance of the System.Security.Principal.SecurityIdentifier class by using an integer that represents the binary form of a security identifier (SID).

Initializes a new instance of the System.Security.Principal.SecurityIdentifier class by using the specified security identifier (SID) in Security Descriptor Definition Language (SDDL) format.

Initializes a new instance of the System.Security.Principal.SecurityIdentifier class by using a specified binary representation of a security identifier (SID).

Initializes a new instance of the System.Security.Principal.SecurityIdentifier class by using the specified well known security identifier (SID) type and domain SID.

Public Fields

static readonly
MaxBinaryLengthint (0).

Returns the maximum size, in bytes, of the binary representation of the security identifier.

static readonly
MinBinaryLengthint (0).

Returns the minimum size, in bytes, of the binary representation of the security identifier.

Public Properties

[read-only]
AccountDomainSidSecurityIdentifier.

Returns the account domain security identifier (SID) portion from the SID represented by the System.Security.Principal.SecurityIdentifier object if the SID represents a Windows account SID. If the SID does not represent a Windows account SID, this property returns ArgumentNullException.

[read-only]
BinaryLengthint.

Returns the length, in bytes, of the security identifier (SID) represented by the System.Security.Principal.SecurityIdentifier object.

[read-only]
override
Valuestring.

Returns an uppercase Security Descriptor Definition Language (SDDL) string for the security identifier (SID) represented by this System.Security.Principal.SecurityIdentifier object.

Public Methods

CompareTo(SecurityIdentifier) : int

Compares the current System.Security.Principal.SecurityIdentifier object with the specified System.Security.Principal.SecurityIdentifier object.

override
Equals(object) : bool

Returns a value that indicates whether this System.Security.Principal.SecurityIdentifier object is equal to a specified object.

Equals(SecurityIdentifier) : bool

Indicates whether the specified System.Security.Principal.SecurityIdentifier object is equal to the current System.Security.Principal.SecurityIdentifier object.

GetBinaryForm(byte[], int)

Copies the binary representation of the specified security identifier (SID) represented by the System.Security.Principal.SecurityIdentifier class to a byte array.

override
GetHashCode() : int

Serves as a hash function for the current System.Security.Principal.SecurityIdentifier object. The SecurityIdentifier.GetHashCode method is suitable for hashing algorithms and data structures like a hash table.

IsAccountSid() : bool

Returns a value that indicates whether the security identifier (SID) represented by this System.Security.Principal.SecurityIdentifier object is a valid Windows account SID.

IsEqualDomainSid(SecurityIdentifier) : bool

Returns a value that indicates whether the security identifier (SID) represented by this System.Security.Principal.SecurityIdentifier object is from the same domain as the specified SID.

override
IsValidTargetType(Type) : bool

Returns a value that indicates whether the specified type is a valid translation type for the System.Security.Principal.SecurityIdentifier class.

IsWellKnown(WellKnownSidType) : bool

Returns a value that indicates whether the System.Security.Principal.SecurityIdentifier object matches the specified well known security identifier (SID) type.

override
ToString() : string

Returns the security identifier (SID), in Security Descriptor Definition Language (SDDL) format, for the account represented by the System.Security.Principal.SecurityIdentifier object. An example of the SDDL format is S-1-5-9.

override
Translate(Type) : IdentityReference

Translates the account name represented by the System.Security.Principal.SecurityIdentifier object into another System.Security.Principal.IdentityReference-derived type.

Public Operators

static
Equality(SecurityIdentifier, SecurityIdentifier)

Compares two System.Security.Principal.SecurityIdentifier objects to determine whether they are equal. They are considered equal if they have the same canonical representation as the one returned by the SecurityIdentifier.Value property or if they are both null.

static
Inequality(SecurityIdentifier, SecurityIdentifier)

Compares two System.Security.Principal.SecurityIdentifier objects to determine whether they are not equal. They are considered not equal if they have different canonical name representations than the one returned by the SecurityIdentifier.Value property or if one of the objects is null and the other is not.