DEV Community

Discussion on: Who am I? Me, the name of the currently executing method in C#

Collapse
 
integerman profile image
Matt Eland

Note that getting the current executing method via a stack trace is an expensive operation.

You can also use the nameof keyword to encode the name of a method, parameter, or member at compile time.