Although I'm sure there is more to this question I'm going to give you exactly what is asked. If this answers your question mark it as answered and any following up questions start a new thread as the next part for adding items deserves another thread.
I will say that this approach although works is best to find another solution to the task at hand rather than digging into reflection.
Let's say we want to create an instance of a Car class
public class Car
{
public int Id { get; set; }
public string Model { get; set; }
public string Manufacturer { get; set; }
}
Step 1
Add this method used later to create an instance of car in this case
public static string CurrentAssembly() =>
Path.GetFileNameWithoutExtension(
Assembly.GetExecutingAssembly()
.ManifestModule.Name);
Step 2, using reflection create an instance of car note
Car spelled out, if Car does not exists, code will throw an exception.
var currentAssembly = CurrentAssembly();
ObjectHandle classHandle = Activator.CreateInstance(null,
$"{currentAssembly}.Car");
object created = classHandle.Unwrap();
Type type = created.GetType();
Step 3, method used to create the list
public IList ListFromType(Type type)
{
var listType = typeof(List<>);
var constructedType = listType.MakeGenericType(type);
return (IList)Activator.CreateInstance(constructedType);
}
Step 3 create the list
IList list = ListFromType(type);
That satisfies your question.