Operator Equality
Equality(Maybe<T>, Maybe<T>)
Performs equality checking on Maybe{T} instances.
Declaration
public static bool operator ==(Maybe<T> m1, Maybe<T> m2)
Parameters
Type | Name | Description |
---|---|---|
Maybe<T> | m1 | A Maybe{T} instance. |
Maybe<T> | m2 | A Maybe{T} instance. |
Returns
Type | Description |
---|---|
System.Boolean | True if the instances are equal, otherwise false. |
Remarks
Returns true if both instances are 'empty'. Returns false is one instance is empty and the other is not. Otherwise returns the result of EqualityComparer{T}.Default.Equals for the inner values of the maybe instances.