5
Answers

Type T, object, & List

Cody Skidmore

Cody Skidmore

15y
5.1k
1
I have a method that receives an object parameter. In some instances, the actual type is a List of unknown type. I need to cast the parameter to a List and process the list items. I got close using Type.IsGenericType and GetGenericArguments(). Does anyone know how to do this?
Answers (5)