using System;
struct MyStruct {
}
class MyClass {
}
class Test where T : struct {
T obj;
public Test(T x) {
obj = x;
}
}
class Test {
public static void Main() {
Test x = new Test(new MyStruct());
Test y = new Test(10);
// But, the following declaration is illegal!
// Test z = new Test(new MyClass());
}
}