To add to Lucas's answer, you probably want to get around a bit, making sure you really have List<something>:
Type type = customerList.GetType();
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(List<>))
itemType = type.GetGenericArguments()[0];
else
Edit: The above code says: "What is this list?". To answer "this List<MyObject>?", use the operator isas usual:
isListOfMyObject = customerList is List<MyObject>
Or, if all you have is Type:
isListOfMyObject = typeof<List<MyObject>>.IsAssignableFrom(type)
source
share