2008-07-14から1日間の記事一覧

実装すべきインターフェイスの一意性

C# 2.0/3.0 で,以下のコードは,エラーである. interface I<T> {} class G<T1, T2> : I<T1>, I<T2> {} // CS0695 error CS0695: 'G<T1, T2>' cannot implement both 'I<T1>' and 'I<T2>' because they may unify for some type parameter substitutionsCS0695 をエラーとする動機は,『C# Lang</t2></t1></t1,></t2></t1></t1,></t>…