Table of Contents

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

obj object

The object to compare against.

Returns

bool

true if obj is an either of the same type which operator ==(Either<T1, T2, T3, T4, T5>, Either<T1, T2, T3, T4, T5>) 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, T5>)

Gives true when the given instance is equal to this one.

public bool Equals(Either<T1, T2, T3, T4, T5> other)

Parameters

other Either<T1, T2, T3, T4, T5>

The instance to compare against.

Returns

bool

true if operator ==(Either<T1, T2, T3, T4, T5>, Either<T1, T2, T3, T4, T5>) considers the two equal.

Remarks

The same compare as operator ==(Either<T1, T2, T3, T4, T5>, Either<T1, T2, T3, T4, T5>), 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.