public override bool Equals(object obj) { if ((obj != null) && (obj != this)) { ByteString bstr = obj as ByteString; byte[] bs; if (bstr != null) { bs = bstr.Bytes; if ((bs == null) && (m_bytes == null)) { return(true); } } else { bs = obj as byte[]; } if (bs != null) { return((m_bytes != null) ? ByteArrayCompare.Compare(m_bytes, bs) : false); } } return(base.Equals(obj)); }
public bool Equals(ByteString obj) { if (obj != null) { byte[] bs = obj.Bytes; if (bs == null) { if (m_bytes == null) { return(true); } } else { return((m_bytes != null) ? ByteArrayCompare.Compare(m_bytes, bs) : false); } } return(false); }