Method Equals
Equals(Object)
Compares the specified object with this set for equality. Returns true
if the
given object is also a set, the two sets have the same size, and every member of the
given set is contained in this set. This ensures that the equals method works properly
across different implementations of the ISet{string} interface.
This implementation first checks if the specified object is this set; if so it
returns true
. Then, it checks if the specified object is a set whose
size is identical to the size of this set; if not, it returns false
. If so,
it uses the enumerator of this set and the specified object to determine if all of the
contained values are present (using System.String.Equals(System.String)).
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | object to be compared for equality with this set |
Returns
Type | Description |
---|---|
System.Boolean |
|