That\'s a pretty elementary question, but I have never delved into generics before and I found myself in the need to use it. Unfortunately I don\'t have the time right now to go
You need to let c# know what type is sent:
List list1 = getListType1(); List list2 = getListType2(); if (someCondition) MyMethod(list1); else MyMethod(list2); void MyMethod(List list){ //Do stuff }