Table of Contents

Equals Method

Definition

Namespace
Tyne
Assembly
Tyne.Core.dll

Methods

| Edit this page View Source

Equals(object?)

Determines whether the specified obj is a Result<T, TE>, and if so is equal to the current instance.

Declaration
[Pure]
public override bool Equals(object? obj)
Parameters
obj
object

An object to compare with this instance.

Returns
bool

true if the specified obj is a Result<T, TE>, and is equal to this instance; otherwise, false.

Overrides
| Edit this page View Source

Equals(Result<T, TE>?)

Determines whether the specified other is equal to the current instance of the same type.

Declaration
[Pure]
public bool Equals(Result<T, TE>? other)
Parameters
other
Result<T, TE>

The other Result<T, TE> to compare with this instance.

Returns
bool

true if the specified other is equal to this instance; otherwise, false.

Remarks

Two Result<T, TE>s are equal if either:

  • both are Ok(T) and their T values are equal
  • both are Error(TE) and their TE errors are equal

Equality is determined via Default.