Right now, I have to do this
private delegate void set(int obj); //declare the prototype
...
Delegate delegate1 = Delegate.CreateDelegate(typeof(set), new testObject(), props[0].GetSetMethod());
((set)delegate1)(1);
Is there a way to CreateDelegate without that prototype and call it with any parameter? GetSetMethod() returns a very specific MethodInfo that takes a specific type as an argument.
Thanks