1: public class MyDelegate
2: {
3:
4: public object Target { get; private set; }
5: public MethodInfo Method { get; private set; }
6:
7: public MyDelegate(object target, MethodInfo method)
8: {
9: this.Target = target;
10: this.Method = method;
11: }
12:
13: public virtual void Invoke(params object[] args)
14: {
15: this.Method.Invoke(this.Target, args);
16: }
17: }