/// <summary> /// Compares this node ID to another node ID. /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(KNodeId32 other) { fixed(byte *ptr = data) { var l = new ReadOnlySpan <byte>(ptr, SIZE); var r = new ReadOnlySpan <byte>(other.data, SIZE); return(l.SequenceEqual(r)); } }
/// <summary> /// Compares this instance to the other instance. /// </summary> /// <param name="other"></param> /// <returns></returns> public int CompareTo(KNodeId32 other) { return(KNodeIdComparer <KNodeId32> .Default.Compare(this, other)); }