running unknow methods
i want to run unknow method with params inside of class.
something like this
public class class1()
{
function function1;
public class1(function paFunction)
{
function1 = paFunction;
}
public run(string param)
{
function1(param);
}
}
-
i want to call this function
pubic void setText(sting paText)
{
text = paText;
}
-
class1 a = new class1(setText);
a.run("hi world");
-
this is only idea how it could to work, but of course it doesn`t, is this possible in C# to do, and how?
thank you,
Gibic

