I need to know the type of an object, that calls a method.
For example.

public void MethodName1()
{
    XClass obj1 = abc;
  // some code here

obj1.Method2(true);

}

Method2(bool) is in a different class, which is being inherited by
multiple classes. So I need to find the type of object that calls this
method.

I want the output to be "XClass" when I need to find the type of the
object that calls Method2(bool). Is there a way I can do that? Right
now the instructions just shows ldloc.x (where x is some index no.). I
am aware that operands can be cast as MethodReference and
FieldReferences and many other types depending on the case, but what
shall I do here?

Thanks!

-- 
--
mono-cecil

Reply via email to