Retrieve method name at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to retrieve the method name and parameters at runtime.
I used the System.Reflection.MethodBase.GetCurrentMethod() to do that, but
in two cases it returned me a System.argumentExecption. The message is:
Cannot evaluate a security function.
How can I do to solve this problem?

Thank's in advance.

Patty
 
I need to retrieve the method name and parameters at runtime.
I used the System.Reflection.MethodBase.GetCurrentMethod() to do that, but
in two cases it returned me a System.argumentExecption. The message is:
Cannot evaluate a security function.
How can I do to solve this problem?

Sounds like it may be a permissions problem. Are you running at full
trust?

Getting a method name uses reflection and isn't cheap -- if you use it a
lot it will affect performance. Also, you won't be able to get
parameter values -- only the names. I think you'll need to tap into the
debugger hooks using MC++ if you want to get values.
 
Back
Top