c# - Generic method for 2 generic list? -


i have 2 lists list<class1> , list<class2>. need create method manupulations. how create generic method passing list parameter.

void manipulatelist(ilist<obj> list) {     //statement; } 

you're trying create generic method:

public void manipulatelist<t>(ilist<t> list) 

if want able things items in lists, you'll want add generic constraint.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -