public void AddEmployee<T> (T employee) where T : Employee
{
//some code here
}
でもこう書くと
public void AddEmployee (Employee Employee)
{
// Code here
}
同様に、
public class GenericList<T> where T : Employee
と
public class GenericList<Employee>
2つの違いはわかりません。のような派生制約としてインターフェースがある場合、私はそれを理解しています
public class GenericList<T> where T : IComparable, IConvertible
しかし、サブクラスが使用されている場合 (上記の従業員のように)、それは私には意味がありません。ここで何か不足していますか?説明してください