[]
Determines whether the specified object is equal to the current Length.
public override bool Equals(object obj)
Type | Name | Description |
---|---|---|
object | obj |
Type | Description |
---|---|
bool | A bool value. |
var length1 = new Length("1in");
object length2 = new Length("1in");
bool result = length1.Equals(length2); // true
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Length other)
Type | Name | Description |
---|---|---|
Length | other | An object to compare with this object. |
Type | Description |
---|---|
bool | A bool value. |
var length1 = new Length("1in");
var length2 = new Length("1in");
bool result = length1.Equals(length2); // true