Last post Apr 05, 2016 04:44 PM by ehsansajjad465
Dec 22, 2008 02:37 AM|rickoshay|LINK
I am using the system cache to squirrel away Work items that are accessed using through a Manager. The Work is generic:
public Work<T> where T : DataContext
That works fine, e.g., new Work<SouthernBreezeDataContext>().
I want the Manager to be generic, too, but I cannot get that to compile.
public Manager<T, U> where T : Work<U> where U : DataContext
This also fails to compile.
public Manager<T> where T : Work<DataContext>
Maybe this is a more general question on using a generic class as the constraint to a generic argument. Any ideas appreciated.
Apr 05, 2016 04:44 PM|ehsansajjad465|LINK
The above code compiles fine, i have just tested in visual studio 2012 and seeing no compilation error. Can you elaborate more what is the error coming with a minimum simplified reproducible example?