Hada
April 30th, 2005, 11:28 AM
I have a delegate in C#, but when I try to invoke the method it represents, I came up with this problem, in the MSDN I found this.
public object DynamicInvoke(
object[] args
);
And this is the code I have:
****************************************
public delegate ProductoT P_BC(string a, string b);
P_BC PF_BC = new P_BC(Producto.BuscarCodigoS);
PF_BC.DynamicInvoke("have no idea");
****************************************
The function "BuscarCodigoS" needs to get two string arguments, and return a ProductoT object, just like the delegate shows, but when I try to invoke the function it asks me for "object[] args", which I have no idea how of what is, does it means that I need to create a class for the arguments? do you have an example of this?
have no idea = object[] args.
public object DynamicInvoke(
object[] args
);
And this is the code I have:
****************************************
public delegate ProductoT P_BC(string a, string b);
P_BC PF_BC = new P_BC(Producto.BuscarCodigoS);
PF_BC.DynamicInvoke("have no idea");
****************************************
The function "BuscarCodigoS" needs to get two string arguments, and return a ProductoT object, just like the delegate shows, but when I try to invoke the function it asks me for "object[] args", which I have no idea how of what is, does it means that I need to create a class for the arguments? do you have an example of this?
have no idea = object[] args.