Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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);
 }