Not even sure if I title this correctly, so forgive me.
Is it possible to check what part of my code is calling a procedure? Example
Sub A1 makes a call to Function C1
Sub B1 makes a call to Function C1
Can i determine in C1 what called it?
probably not in the language itself, why not just set like a bool in C1 to be true if A1 called it and false if B1 called it?
Yes, using System.Diagnostics.StackTrace, or you can get the calling assembly with the Assembly class.
http://msdn2.microsoft.com/en-us/library/system.diagnostics.stacktrace(VS.71).aspx
that is exactly what I needed. Thank you so much K.
Shadow, That would mean I would have to do that in every procedure that I would check against. and while I guess it would work. I can't vouch that my memory is good enough to do that every time and not make a mess down the road.