Determine caller class name

  • Thread starter Thread starter qingxun
  • Start date Start date
Q

qingxun

Hi!

Is there a way in VB.NET to determine the caller's class name?

System.Reflection.MethodBase.GetCurrentMethod.GetType basically telling
me what is my current executing class, but I wanted to know, which
caller class invoke my existing class method.

Any help is much appreciated.


Bob
 
Is there a way in VB.NET to determine the caller's class name?

Why? Code within any given method should not care how or from where it
was called.

If you need to do things differently within a method based on a given
value, pass that value as an argument to the method (you could, of
course, pass a reference to the calling object!).

Regards,
Phill W.
 
Back
Top