You do not use ^ hat in the where clause. It names the type, not the type descriptor, which you would use to declare a variable or parameter. The T type parameter is already entered by the generic keyword, you do not apply it again to the method name, as it would in C #. Therefore, it should look like this:
generic <typename T>
where T: MyFetch, gcnew()
IEnumerable<T>^ Fetch() {
}
source
share