0

Hello I have a problem accessing classes which I have in folders within the projects.

I have project and two folders in which I have classes with the same name.

Parent namespace is - textboxes

In first folder namespace is - textboxes.folder1
In second folder namespace is - textboxes.folder2

They have different namespaces

folder1/
    class1
    class2
    class3

folder2/
    class1
    class2
    class3

I want to use it like that.

string current_type = "class2";

object obj = Activator.CreateInstance(typeof(object), current_type);

Could you please help me how to specify which class will the CreateInstance call?

Hille
  • 2,123
  • 22
  • 39
marhyno
  • 677
  • 1
  • 8
  • 20

0 Answers0