Hardy,
As you shouldn't, as the ParameterInfo class represents the parameter,
not the call itself. It is the call that contains the values of the
parameter. It's kind of like saying why doesn't the MethodInfo class tell
you what the return value is (not the type, but the value)?
It would be nice if there was a GetParameterValues method on the
StackFrame instance, which would take a ParameterInfo instance and then
return the value in that parameter.
If you want to get this information, you have to pass the values to your
logging object somehow.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
ni**************@exisconsulting.com
"Hardy Wang" <ha********@marketrend.com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl...
Hi all:
I have a logging class, which is used to log errors automatically.
With StackFrame.GetMethod().GetParameters() function, I am able to read all
parameter information except the real paramter value from ParameterInfo
class.
is there a way I can read real parameter values?
Thanks!!
--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy