Show / Hide Table of Contents
  • MaybeSharp
    • Maybe<T>
      • As
      • Bind
      • Cast
      • CompareTo
      • Equality
      • Equals
      • Explicit
      • GetHashCode
      • GreaterThan
      • GreaterThanOrEqual
      • HasValue
      • Implicit
      • Inequality
      • IsEmpty
      • LessThan
      • LessThanOrEqual
      • Maybe
      • Nothing
      • ToString
      • Value
  • MaybeSharp.Extensions
    • MaybeDictionaryExtensions
      • TryGetValue
    • MaybeExtensions
      • Coalesce
      • Or
      • Select
      • SelectMany
      • SelectNonempty
      • ToNullable
      • ValueOr
      • ValueOrException
      • WhenNothing
      • WhenSomething
      • Where
    • MaybeStringExtensions
      • TryParseBoolean
      • TryParseByte
      • TryParseChar
      • TryParseDateTime
      • TryParseDateTimeOffset
      • TryParseDecimal
      • TryParseDouble
      • TryParseInt
      • TryParseInt16
      • TryParseInt64
      • TryParseSingle
    • NullableExtensions
      • ToMaybe

Method Equals

Equals(Object)

Performs an equality check.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The value to compare to.

Returns
Type Description
System.Boolean

True if obj is considered equal to this instance.

Overrides
System.ValueType.Equals(System.Object)
Remarks

If obj is not an instance of this Maybe{T} type then the result is false, otherwise the result of Equals(Maybe<T>) is returned.

Equals(Maybe<T>)

Performs an equality check.

Declaration
public bool Equals(Maybe<T> other)
Parameters
Type Name Description
Maybe<T> other

The instance to compare to.

Returns
Type Description
System.Boolean

True if the values are considered equal, otherwise false.

Equals(T)

Performs an equality check.

Declaration
public bool Equals(T other)
Parameters
Type Name Description
T other

A value to compare the nothing.

Returns
Type Description
System.Boolean

True if the values are considered equal, otherwise false.

Remarks

A nothing/empty maybe is never equal to a T value.

Back to top Copyright (c) 2017 Troy Willmot