Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public CnlNumList(long listID, CnlNumList sourceList)
        {
            if (sourceList == null)
            {
                throw new ArgumentNullException(nameof(sourceList));
            }

            ListID     = listID;
            CnlNums    = sourceList.CnlNums;
            CnlIndexes = sourceList.CnlIndexes;
            CRC        = sourceList.CRC;
        }
Beispiel #2
0
 /// <summary>
 /// Determines whether two object instances are equal.
 /// </summary>
 public bool Equals(CnlNumList list)
 {
     if (list == null)
     {
         return(false);
     }
     else if (list == this || list.ListID == ListID || list.CnlNums == CnlNums)
     {
         return(true);
     }
     else if (list.CRC == CRC)
     {
         return(list.CnlNums.SequenceEqual(CnlNums));
     }
     else
     {
         return(false);
     }
 }