Пример #1
0
        /// <summary>
        /// 关键字大小
        /// </summary>
        /// <param name="other">关键字</param>
        /// <returns>比较结果</returns>
        public int CompareTo(primaryKey <keyType1, keyType2> other)
        {
            int cmp = Key1.CompareTo(other.Key1);

            return(cmp != 0 ? cmp : Key2.CompareTo(other.Key2));
        }
Пример #2
0
 /// <summary>
 /// 关键字比较
 /// </summary>
 /// <param name="other">关键字</param>
 /// <returns>是否相等</returns>
 public bool Equals(primaryKey <keyType1, keyType2> other)
 {
     return(Key1.Equals(other.Key1) && Key2.Equals(other.Key2));
 }