The only typed way you can do this is if the other method is common, and you let you type in the type of the general type:
void SomeOtherMethod<T>(List<T> list) {...} ... SomeOtherMethod(totalSearch);
You can also pass it without any type information via IList , IEnumerable , object or dynamic , of course.
source share