BitSharper.Sha256Hash.Equals C# (CSharp) Method

Equals() public method

Returns true if the hashes are equal.
public Equals ( object other ) : bool
other object
return bool
        public override bool Equals(object other)
        {
            if (!(other is Sha256Hash)) return false;
            return _bytes.SequenceEqual(((Sha256Hash) other)._bytes);
        }

Usage Example

Example #1
0
        public override bool Equals(object o)
        {
            if (!(o is Block))
            {
                return(false);
            }
            var other = (Block)o;

            return(Hash.Equals(other.Hash));
        }