c# - Calling a method with Generic signature and parameter -


i have following signature has generic type , parameter below:

list<t> getmylist<t>(t filter); 

the filter type different list type. trying call this:

var mylist = repo.getmylist<list<items>>(filter); 

i not sure how specify type of 'filter' in method call. possible?

if types different, need have 2 generic types, below:

public list<t1> getmylist<t1, t2>(t2 filter); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -