예제 #1
0
        /// <summary>
        /// 2つの<see cref="DoubleKey{TKey1, TKey2}"/>のインスタンスの同値性を確かめる
        /// </summary>
        /// <param name="other">同値性を確かめるもう一つの<see cref="DoubleKey{TKey1, TKey2}"/>のインスタンス</param>
        /// <returns>同値であったらtrue,それ以外でfalse</returns>
        public bool Equals(DoubleKey <TKey1, TKey2> other)
        {
            var key1Equal = EqualityComparer <TKey1> .Default.Equals(Key1, other.Key1);

            var key2Equal = EqualityComparer <TKey2> .Default.Equals(Key2, other.Key2);

            return(key1Equal && key2Equal);
        }
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="doubleKey">格納する<see cref="DoubleKey{TKey1, TKey2}"/></param>
 /// <param name="value">格納する<typeparamref name="TValue"/></param>
 internal DoubleKeyValuePair(DoubleKey <TKey1, TKey2> doubleKey, TValue value) : this(doubleKey.Key1, doubleKey.Key2, value)
 {
 }