Hi
if you have a variable typed as IList, not the generic IList<T>, and you know it could be a List<T> at run time and you want to add many items to it, is there a way to call the AddRange method of the list?
The problem is the cast if you don't know what "T" is how can you do the cast...
Guess reflection is the only way, isn't it? But still how is it done using refelection...??
//partially pseudo code...
void GenericAddRange(IList list, IEnumerable newData)
{
var listOfT = list as ???
if (null != listOfT) listOfT.AddRange(newData as ???)
}thx