public bool Equals(IError x, IError y) { // Note: value types can't have derived classes, so we don't need return(x != null && y != null && x.Equals(y)); }
public bool Equals(IError x, IError y) { // Note: value types can't have derived classes, so we don't need return x != null && y != null && x.Equals(y); }
/// <summary> /// 両方とも成功か、または失敗の場合に true を返します。失敗の場合は値の比較も行われます。 /// </summary> /// <param name="other">比較する値</param> /// <returns>両方とも成功か、または失敗の場合に true</returns> public bool Equals(Result other) => IsOk ? other.IsOk : _errorValue.Equals(other._errorValue);