You can find out which TYPE called the object constructor, but I don't
know how to find out which object instance.
public MyConstructor()
{
System.Diagnostics.StackFrame frame = new
System.Diagnostics.StackFrame(1);
Type callerType = frame.GetMethod().DeclaringType;
}
Mike wrote:
Hi,
There are some way to know which object (A) create an instance of object (B)
in the constructor of object (B)?
Thanks.