3
내가 컴파일러 경고를 해결하기 위해 노력하고 있어요에서 형식 매개 변수와 같은 이름을 가진 :경고를 해결하는 방법 : TKEY는 외부 유형
protected class KeyedDictionaryEntryCollection<TKey> : KeyedCollection<TKey, DictionaryEntry> {
public KeyedDictionaryEntryCollection() {}
public KeyedDictionaryEntryCollection(IEqualityComparer<TKey> comparer) : base(comparer) {}
protected override TKey GetKeyForItem(DictionaryEntry entry) {
return (TKey) entry.Key;
}
}
:
Type parameter 'TKey' has the same name as the type parameter from outer type 'Common.Core.ObservableDictionary<TKey,TValue>'
이 문제의 코드는 첫 번째 TKey를 보여줍니다.
어떻게 해결할 수 있습니까? 코드는 정상적으로 작동하지만 모든 컴파일러 경고를 해결하기 위해 노력하고 있습니다.
감사합니다. –