C
clr
I like to stamp trace logs with the name of the executing Class and Method.
I can get the Class Name using GetType.Name and I can get a list of every
Method in the class using System.Reflection.MethodInfo objects (code
follows) But is there anyway to retrieve the name of the currently
executing Method? Or is this a lost cause?
(code sample)
Dim sClassName as String = Me.GetType.Name
Dim aMethod() as System.Reflection.MethodInfo =
Me.GetType.GetMethods(BindingFlags.Public or BindingFlags.Instance or
BindingFlags.DeclaredOnly)
Each member of aMethod has a Name property giving me a complete list of all
of the Class Methods.
Thanks
clr
I can get the Class Name using GetType.Name and I can get a list of every
Method in the class using System.Reflection.MethodInfo objects (code
follows) But is there anyway to retrieve the name of the currently
executing Method? Or is this a lost cause?
(code sample)
Dim sClassName as String = Me.GetType.Name
Dim aMethod() as System.Reflection.MethodInfo =
Me.GetType.GetMethods(BindingFlags.Public or BindingFlags.Instance or
BindingFlags.DeclaredOnly)
Each member of aMethod has a Name property giving me a complete list of all
of the Class Methods.
Thanks
clr