Rightthen

Rightthen

  • NA
  • 31
  • 14.8k

T fn(int a, int b) is interface possible for t

Jul 10 2013 4:40 PM
Dear Fellows,

interface Ico<T>
    {
       
         T Result{get ; set; }
         SomeType<T1> Call<T1>(Delegate a, params object[] b);
         SomeType<T> PreviousChainCell{get ;set ; }
    }
works fine but i want that the returing type (SomeType) of the methods not to be explicitly described here, type implementing it should name itself instead of SomeType.

what i want is like this
         T2 <T1> Call<T1>(Delegate a, params object[] b);
where T2 is the implementing type of the interface i don't know how to get it right
compiler won't let me specify like this
i tried
interface Ico<T,T2>
but that does not work either.

Is it even possible in c#

Thanks
Regards

Answers (2)