I want to get a generic input to my function.
I tried
interface IReport <T , T1>
{
List<T> GenerateReport<T1>();
}
But i get warnings on the first T1 , that it was never used , and on second T1 that I declaring with the same name as other type parameter .
Any idea what I am doing wrong here ?
You don’t need to define
T1at the method, because it’s already defined at interface level.This is correct:
Or this:
See
Generic Methods