Method Equals
- Namespace
- SodaFlow.Functional
- Assembly
- SodaFlow.Functional.dll
Equals(object?)
Gives true when the given object is an either of this same type which is equal to this one.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare against.
Returns
- bool
true if
objis an either of the same type which operator ==(Either<T1, T2, T3, T4>, Either<T1, T2, T3, T4>) considers equal to this one.
Remarks
An either is never equal to the bare value it holds, only to a second either.
Equals(Either<T1, T2, T3, T4>)
Gives true when the given instance is equal to this one.
public bool Equals(Either<T1, T2, T3, T4> other)
Parameters
otherEither<T1, T2, T3, T4>The instance to compare against.
Returns
- bool
true if operator ==(Either<T1, T2, T3, T4>, Either<T1, T2, T3, T4>) considers the two equal.
Remarks
The same compare as operator ==(Either<T1, T2, T3, T4>, Either<T1, T2, T3, T4>), with the name that Default looks for. Thus, a compare of these in a collection does not box the two operands, as Equals(object?) must.