I saw older posts here on SO, about one year old, which would mean that they really didn't cover .NET 4, or maybe even 3.5 on this topic. So here.
If you with reflection should have chosen the parameters for the current method
ParameterInfo[] methodParams = MethodInfo.GetCurrentMethod().GetParameters();
Enumerating each parameter will allow you to bring the parameter-name, however, there is only "DefaultValue", which I assume is due to new dynamic parameters in .NET 4.
However, my question is: Is it impossible to get the values of the method parameters without digging into the debugger API?
I know there might be a design flaw if you even need to consider using this.
source
share