I'm a little unsure of how to state the title of this question, but I'm looking for the shortest / aseist method in VB.NET (or C #, but using VB.NET at the moment) to get the string value of the method name dynamically given by the method call.
For example, I have a class like this:
Public Class Blah
Public Sub Foo()
End Sub
End Class
Now Foo is a strongly typed cover for the dynamic parameter, and I have an event handler that fires when the setting is changed and returns the row name of the changed setting.
I would like to be able to switch / select on this line and have a case based on the Foo () method. To do this, I need to get the string name of the Foo method from the method call itself (for example, GetMethodName (blahInstance.Foo ())).
source
share