SecurityIdentifier.Equals Method

Definition

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

Overloads

Equals(Object)

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

Equals(SecurityIdentifier)

Indicates whether the specified SecurityIdentifier object is equal to the current SecurityIdentifier object.

Equals(Object)

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

C#
public override bool Equals(object? o);
C#
public override bool Equals(object o);

Parameters

o
Object

An object to compare with this SecurityIdentifier object, or null.

Returns

true if o is an object with the same underlying type and value as this SecurityIdentifier object; otherwise, false.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5

Equals(SecurityIdentifier)

Indicates whether the specified SecurityIdentifier object is equal to the current SecurityIdentifier object.

C#
public bool Equals(System.Security.Principal.SecurityIdentifier sid);

Parameters

sid
SecurityIdentifier

The object to compare with the current object.

Returns

true if the value of sid is equal to the value of the current SecurityIdentifier object.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5