m-y*_*m-y 6 c# generics custom-attributes
[MyCustomClassAttribute]
public class Foo
{
}
public class Bar<T>
where T : ??
{
public T FooInstance;
}
Run Code Online (Sandbox Code Playgroud)
我很确定这是不可能的,但我想我会检查一下.任何方式使T必须有一个[MyCustomClassAttribute]
吗?