I would like (in an ELEGANT way) to use some custom method attribute which will give me this:
When I call such a method foo(), in some attribute I’ll have the elapsed time (how long the method call lasted).
How can I do it in C#? Reflections?
Thank you in advance.
James
C# doesn’t offer this out of the box. You have a few choices: