How can I get the Name of the Method dynamically.
For example ..
Public Function Test() As Boolean
'//Here I would like to get the name of this method dynamically ...
'//I would like to avoid HardCoding Test here
End Function
Printable View
How can I get the Name of the Method dynamically.
For example ..
Public Function Test() As Boolean
'//Here I would like to get the name of this method dynamically ...
'//I would like to avoid HardCoding Test here
End Function
VB Code:
System.Reflection.MethodBase.GetCurrentMethod.GetCurrentMethod.Name
Many Tx. :D
Is it somehow possible to get the parameter info and/or return type of the method too ???
Got it Already ..
ParameterInfo method instead of Name property ..
Yer, its all in there:
System.Reflection.MethodBase.GetCurrentMethod.GetParameters(0).ParameterType.ToString
just look up
System.Reflection.MethodBase.GetCurrentMethod