Quote:Original post by Dope-Show Well, the JITter is also a compiler, a Just-In-Time Compiler, but that doesn't matter, does it? [wink]
So is there a way to find out a method's caller, that actually works and is reliable?
Heh heh. Semantics!
The only way I can think of is to manually track the function name yourself ala the static variable. Everything else is subject to the whim of the system.
Washu might have some more ideas. He is DotNetGod! :)
Quote:Original post by Washu No, you don't. ConstructorInfo and MethodInfo both inherit from MethodBase, which inherits from MemberInfo. MemberInfo is the class that contains the Name property, MethodBase is the class that contains the GetCurrentMethod() function.
Meh, I prefer to work at the most defined level, sorry. :)
That's silly. The more abstract the level you work on, the less you have to worry about implementation details. The less you have to worry about implementation details the faster your ability to test, develop and debug code.
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.