Hello,
If I have a delegate and a method
public delegate void SomeDelegate(String p);
void aMethod(String p) {
}
And then I try to invoke this on a new thread like so
SomeDelegate sd = new SomeDelegate(aMethod());
sd.BeginInvoke("heyhey", callBack, null)
The BeginInvoke method call now accepts a string as the first parameter, however, if I remove the "String p" from the delegate and the aMethod(), BeginInvoke now only requires two parameters.
How can I build a function like BeginInvoke that dynamically accepts different types of parameters based on code elsewhere?
Sorry If Im being vague here but I've never seen this before and I'm very curious.