ikantspelwurdz
Well-known member
- Joined
- Dec 8, 2009
- Messages
- 49
- Programming Experience
- 1-3
Take this code:
I would like this to print information about the method.
This would be good output:
Member of Microsoft.VisualBasic.Interaction
This would be even better output:
Assembly Microsoft.VisualBasic
C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.VisualBasic.dll
The class MethodInfo looks promising, but is there a way to construct it from the method itself, not from the containing type? All the samples I found look like this:
...and that doesn't help me, because I don't know that "Microsoft.VisualBasic.Interaction" is the name of the containing type.
VB.NET:
Dim s As String = Foo(AddressOf MsgBox)
Console.WriteLine(s)
I would like this to print information about the method.
This would be good output:
Member of Microsoft.VisualBasic.Interaction
This would be even better output:
Assembly Microsoft.VisualBasic
C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.VisualBasic.dll
The class MethodInfo looks promising, but is there a way to construct it from the method itself, not from the containing type? All the samples I found look like this:
VB.NET:
Dim mi() As MethodInfo = GetType(Microsoft.VisualBasic.Interaction).GetMethods()
Console.WriteLine("")