I am trying to create a list of a certain type.
I want to use the List notation but all I know is a \"System.Type\"
The type a have is variable. How can I cr
Something like this should work.
public IList createList(Type myType) { Type genericListType = typeof(List<>).MakeGenericType(myType); return (IList)Activator.CreateInstance(genericListType); }