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" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -