How to get parameter value from StackTrace [duplicate]
问题 This question already has answers here : Is it possible to get parameters' values for each frame in call stack in .NET (2 answers) Closed 6 years ago . From within a method call I need to "jump" three layers up the stack and retrieve the type and value of the parameters passed to that method. Getting the parameter type is easy but I couldn't find a way to get the value passed to a certain method on the stack. var st = new StackTrace(); var frames = st.GetFrames(); var methodParameters = frame