Create a <T> List Using GetType ()

Is it possible to create a List or IEnumerable with GetType ().

// If T is Type of Contact I want to Return List<Contact>

Test(typeof(Contact));//return List<Type>

    public static IEnumerable<T> Test<T>(T t)
    {
        return new List<T>();  //return List<Type>

    }
+3
source share
1 answer
 public static IList GetList(Type type)
 { 
    return (IList) Activator.CreateInstance(typeof(List<>).MakeGenericType(type));
 }
+7
source

Source: https://habr.com/ru/post/1759038/