i have the following senario:
class Addition{
public Addition(int a){ a=5; }
public static int add(int a,int b) {return a+b; }
}
i am calling add in another class by:
string s="add";
typeof(Addition).GetMethod(s).Invoke(null, new object[] {10,12}) //this returns 22
i need a way similar to the above reflection statement to create a new object of type Addition using Addition(int a)
so i have string s= "Addition"
i want to create a new object using reflection.
is this possible?