i'm having the class name as string format "MyClass",i want to create a object for that class where i am referring this class namespace in dll.
my requirement is:
MyClass myClassObj=new MyClass();
all i am having is string name= "MyClass";
so, by using the string name is there anyway to convert string as class object??
I had tried giving "using NotCurrentProject.Entities"
string selectItem="myString";
Type elementType = Type.GetType("NotCurrentProject.Entities." + selectedEntity + ");
object o = Activator.CreateInstance(elementType);