Equatable
Provides a base implementation for objects that support equality, comparison, and cloning.
Erbt von: Cloneable<T>
Implementiert: IEquatable<T>, IComparable<T>, IComparable
Methoden
public virtual int CompareTo(T value)
result = equatable.CompareTo(value)
Compares the current object with another object of the same type.
- value
- An object to compare with this object.
Rückgabe: 0 if equal; -1 if not equal.
public int CompareTo(object value)
result = equatable.CompareTo(value)
Compares the current object with another object.
- value
- An object to compare with this object.
Rückgabe: 0 if equal; -1 if not equal.
public virtual bool Equals(T other)
result = equatable.Equals(other)
Indicates whether the current object is equal to another object of the same type.
- other
- An object to compare with this object.
Rückgabe: true if the current object is equal to the other parameter; otherwise, false.
public override bool Equals(object obj)
result = equatable.Equals(obj)
Determines whether the specified object is equal to the current object.
- obj
- The object to compare with this object.
Rückgabe: true if the specified object is equal to the current object; otherwise, false.
public override int GetHashCode()
result = equatable.GetHashCode()
Serves as the default hash function.
Rückgabe: A hash code for the current object.
protected virtual bool OnEquals(T other)
result = equatable.OnEquals(other)
Determines equality between this instance and another instance of the same type.
- other
- An object to compare with this instance.
Rückgabe: true if the objects are equal; otherwise, false.
public static bool op_Equality(Equatable<T> left, T right)
result = Equatable.op_Equality(left, right)
Determines whether an Equatable object and an object of type T are equal.
- left
- The Equatable object.
- right
- The object of type T.
Rückgabe: true if the objects are equal; otherwise, false.
public static bool op_Equality(Equatable<T> left, Equatable<T> right)
result = Equatable.op_Equality(left, right)
Determines whether two Equatable objects are equal.
- left
- The left Equatable object.
- right
- The right Equatable object.
Rückgabe: true if the objects are equal; otherwise, false.
public static bool op_Inequality(Equatable<T> left, T right)
result = Equatable.op_Inequality(left, right)
Determines whether two Equatable objects are not equal.
- left
- The left Equatable object.
- right
- The right object of type T.
Rückgabe: true if the objects are not equal; otherwise, false.
public static bool op_Inequality(Equatable<T> left, Equatable<T> right)
result = Equatable.op_Inequality(left, right)
Determines whether two Equatable objects are not equal.
- left
- The left Equatable object.
- right
- The right Equatable object.
Rückgabe: true if the objects are not equal; otherwise, false.