示例#1
0
 private void Initialize(IEqualityComparer <TKey> comparer = null)
 {
     this.Comparer = comparer;
     if (comparer != null)
     {
         _keyedCollection = new KeyedCollection2 <TKey, KeyValuePair <TKey, TValue> >(x => x.Key, comparer);
     }
     else
     {
         _keyedCollection = new KeyedCollection2 <TKey, KeyValuePair <TKey, TValue> >(x => x.Key);
     }
 }