I need anyone's help!!! i have to build a list of methods that will be available for decoupled components to add and call functions from another components, so far i am using delegates to add methods to the list, but delegates ask me to state the type of parameters that each method has, and i want the list to accept any kind of method regarding the signaturei want to be able to do this:
class1{
List methods;
methods.add(int index, Method method) //Method can be other than Delegate, i don't mind
{ .... }
}
class2{
class1.methods. add(1,M1);
class2.methods. add(2,M2);
class3.methods. add(3,M3);
void M1(string g){...}
void M2(int f, int w){ .. }
void M3() { ... }
}
class3{
class1.call(1);
class1.call(3);
}
please please please!!! somebody?? anybody??
class1{
List methods;
methods.add(int index, Method method) //Method can be other than Delegate, i don't mind
{ .... }
}
class2{
class1.methods. add(1,M1);
class2.methods. add(2,M2);
class3.methods. add(3,M3);
void M1(string g){...}
void M2(int f, int w){ .. }
void M3() { ... }
}
class3{
class1.call(1);
class1.call(3);
}
please please please!!! somebody?? anybody??
Comment