Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
Example #1
0
        // - 9번
        static void escape_byte(uint8_t b)
        {
            crc = crc_byte(crc, b);

            if (b.Equals(DEF_RF_MSG.SYNC_BYTE) || b.Equals(DEF_RF_MSG.ESCAPE_BYTE))
            {
                escaped[escapeptr++] = System.Convert.ToByte(DEF_RF_MSG.ESCAPE_BYTE);
                escaped[escapeptr++] = System.Convert.ToByte(b ^ 0x20);
            }
            else
            {
                escaped[escapeptr++] = System.Convert.ToByte(b);
            }
        }
Example #2
0
 public bool SamePosition(Bits[] p1, Bits[] p2)
 {
     if (p1.Length != p2.Length)
         return false;
     for (int i = 0; i < p1.Length; ++i) {
         if (!p1.Equals (p2))
             return false;
     }
     return true;
 }