public override bool Equals(Object obj)
        {
            // Check for null values and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            canMessage p = (canMessage)obj;

            return(getCanId() == p.getCanId() &&    // id
                   is29bitId() == p.is29bitId() &&  // id len
                   getDlc() == p.getDlc() &&        // dlc
                   getData() == p.getData());       // data
        }
 private int findIndex(canMessage msg)
 {
     return(m_list.FindIndex(x => x.Id == msg.Id && x.getDlc() == msg.getDlc()));
 }
        //-------------------------------------------------------------------------------------------------

        // is a row selected
        private bool isSelected(canMessage msg)
        {
            var row = getMsgRow(msg.getCanIdString(), msg.getDlc());

            return(row != null ? row.Selected : false);
        }