Good Enchiladas wrote:
Is it possible to determine a method's own attributes from within the
method without hardcoding the name of the method as a constant within
the method? Please tell me if it is possible and how it is done.
Presumably you're talking about .NET development, since native C++ has no
reflection abilities.
In .NET development, you can use the System::Environment::StackTrace
property to get a stack trace of the current execution context as a string,
and then parse the full class name, method name and parameters from that
string.
If there's a more direct way, I don't know it - but I wouldn't be surprised
if there is!
-cd