There is no such thing as typeof(List). However, it typeof(List<>)works fine and is an open generic type. Then you just use:
var genericDefinition = typeof(List<>);
var genericArgument = typeof(string);
var concreteListType = genericDefinition.MakeGenericType(new[] {genericArgument});
and you must find what concreteListTypeis typeof(List<string>).
source
share