I can get information about a parameter by StackTrace using something like this:
catch (Exception ex)
{
var st = new StackTrace(ex);
System.Reflection.ParameterInfo pi = st.GetFrame(0).GetMethod().GetParameters().First();
}
I want know how i get the value of parameter. Example:
If my method in stack trace was like:
void MyMethod(object value)
And the call was like:
MyMethod(10);
I want to get the value 10.
How i do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…