S
Steve B. [Labo.Net]
Hi
I can step trough the stackTrace using the System.Diagnostic.StackTrace and
System.Diagnostics.StackFrame classes.
But how can I get passed parameters to methods ?
I can get name and type of all parameters using reflection, but not the
actual value.
For example :
public void myMethod(string myString)
{
.... do something ...
GetParams();
}
public void GetParams()
{
... getting values for params ...
foreach( param in ????)
Console.WriteLine(param.Name + Param.Value);
}
GetParams is just an exemple and is succeptible to be called from anywhere
Any idea ?
I can step trough the stackTrace using the System.Diagnostic.StackTrace and
System.Diagnostics.StackFrame classes.
But how can I get passed parameters to methods ?
I can get name and type of all parameters using reflection, but not the
actual value.
For example :
public void myMethod(string myString)
{
.... do something ...
GetParams();
}
public void GetParams()
{
... getting values for params ...
foreach( param in ????)
Console.WriteLine(param.Name + Param.Value);
}
GetParams is just an exemple and is succeptible to be called from anywhere
Any idea ?