Is there a straightforward way using reflection to get at the parameter list for a delegate if you have its type information?
For an example, if I declare a delegate type as follows
delegate double FooDelegate (string param, bool condition);
and later get the type information for that delegate type as follows
Type delegateType = typeof(FooDelegate);
Is it possible to retrieve the return type (double) and parameter list ({string, bool}) from that type info object?
If you have faced a signature mismatch with your bank, just walk into the bank branch. You have to fill up some forms to submit the changed/modified signature.
You have two options for getting a digital signature: Get a digital signature from a Microsoft partner. Create your own digital signature.
Open the file that contains the certificate you want to view. Click File > Info > View Signatures. In the list, on a signature name, click the down-arrow, and then click Signature Details. In the Signature Details dialog box, click View.
MethodInfo method = delegateType.GetMethod("Invoke"); Console.WriteLine(method.ReturnType.Name + " (ret)"); foreach (ParameterInfo param in method.GetParameters()) { Console.WriteLine("{0} {1}", param.ParameterType.Name, param.Name); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With