public void Test<TFeature>(Func<TController, ViewResult> controllerAction)
where TController : IController
where TFeature : ISecurityFeature
{
...
}
I’m getting the error, Test does not define type parameter TController. How can I put a constraint on TController?
Unless you are defining it inside
SomeClass<TController>(in which case you need to put constraint next toclass SomeClass<TController>), you need to makeTControllera generic argument of your function, i.e.: