I am trying to do some reflection which includes creating an object via reflection. I know the name of the class, I just want to dynamically create the class via the name (and assembly if necessary.) I don't want to switch on the text name of the class and hard code the creation of the class, I just want to get a reference to a new object of some type that I specify via a string. Anyone done this I know you can do this in Java simply enough, I would assume that there is a way to do this in C# but I can't find it in the documentation!
Your help would be appreciated!
Marty

Dynamic creation of an instance by name
Basel Alnachef
Marty
Nam Tran
Type t = Type.GetType(typeName);
object o = Activator.CreateInstance(t);
Alex Chew
Ken Davis