vendredi 12 juin 2015

Get name of Method by pointing it out?

I have a member that looks like this MyClass.SpecialMethod() I need to send the name of this method as string to another method. I know that I can use TypeOf.GetMethods(..).Name but the .. will be hardcoded and if SpecialMethod changes name there will be problems.

So what I want to do is something like this

TypeOf(MyClass).GetMethod(MyClass.SpecialMethod).Name

This is posible, and if so, how?

I know that I can get the name of the current method from inside the method but at this point its to late.





Aucun commentaire:

Enregistrer un commentaire