MethodA(Delegate obj)
{
MethodB(obj):
}
MethodB(Delegate obj)
{
MethodC(obj):
}
MethodC(Delegate obj)
{
//By using obj need to Track all The Travellled Methods info
// Like MethodA.MethodB.MethodC
}
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Nov 26, 2014, 7:36 AM
To track the methods which have been called up to the current point, you need a stack trace:
The output is :
Notice that the only method in the invocation list is MyGreeting.
However, the stack trace reveals the methods that have been called culminating in MethodC.
Notice also that I've had to add extra code to MethodA and MethodB to avoid them being 'optimized away' by the JIT compiler.
Manish Kumar ChoudharyPosted Nov 26, 2014, 6:04 AM
Read these links it may help you
http://msdn.microsoft.com/en-us/library/bb985537.aspx
http://etutorials.org/Programming/visual-c-sharp/Part+II+Advanced+C/Chapter+6+Delegates+and+Attributes/Using+Delegates/