I've written a procedure to log each function/procedure name (for debug purposes). This is run at the start of every function/procedure for debug purposes. But I want to also get the parameters passed (if any) of the calling function/procedure and be able to display them in a text file without having to hard code them. Is there a way using reflection to do this ?
Here is a snippet of my code so far:
Dim currentMethod As System.Reflection.MethodBa
se
currentMethod = New System.Diagnostics.StackTr
ace().GetF
rame(1).Ge
tMethod()
MessageBox.Show("Current Method is " + currentMethod.ReflectedTyp
e.FullName
+ "." + currentMethod.Name)
Start Free Trial