I have a table in my database that I use to manage relationships across my application. it\'s pretty basic in it\'s nature - parentType,parentId, childType, childId... all a
If the type is known by the caller, there's a better, faster way than using Activator.CreateInstance: you can instead use a generic constraint on the method that specifies it has a default parameterless constructor.
Doing it this way is type-safe and doesn't require reflection.
T CreateType() where T : new()
{
return new T();
}