// C#
class GenericClass<T> where T : class
{
public T objectStudent { get; set; }
}
class Student
{
private string name;
private int korean;
private int eng;
private int math;
}
class Program
{
static void Main(string[] args)
{
// 컴파일 에러.
// GenericClass<int> genericObject = new GenericClass<int>();
// class 형식만 허용.
GenericClass<Student> genericObject = new GenericClass<Student>();
}
}
// C#
class Student<T, U>
where T : class
where U : struct
{
}