Hi to 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?
I'm sure It's possible because Visual studio in Debub mode, in local
window shows the name and the value of all params..
I want to make a trace function WriteMethodInfo that takes all params
for logging..
public void FunName(type1 param1, type2 param2...)
SLDebug.WriteMethodInfo(param1, param2...);
//I would write "SLDebug.WriteMethodInfo();" but I don't know how
WriteMethodInfo()
//could take params from the stack!
try
{
Do something...
}
catch (Exception ex)
{
throw ExceptionManager.LogException(ex);
}
Thanks!!
Giojo