I need to copy a sub set of items from one list to another. However I do not know what kind of items are in the list - or even if the object being passed is a list.
I can see if the object is a list by the following code
t = DataSource.GetType();
if (t.IsGenericType)
{
Type elementType = t.GetGenericArguments()[0];
}
What I cannot see is how to get to the individual objects within the list so I can copy the required objects to a new list.