I wanted to know if this is possible:
public class Foo<T> where T : Func<T>
or
public class Foo<T> where T : Func<>
It seems like the compiler is telling me it not possible. I suppose I can throw a runtime exception in the constructor, but was hoping to have it a compiler error.
Any ways about doing this?
T
, then useFunc<T>
in your class. – Renteria