M
Martin Bischoff
Hi,
if I have two classes, ClassA and ClassB, and ClassA has a member of
type ClassB, is it possible from within ClassB to find out that the
current instance is a member of ClassA?
Example:
class ClassA
{
private ClassB _myClassB = new ClassB();
}
class ClassB
{
public void FindOwner()
{
// is there some way to find out, that this
// instance is a member of an instance of
// ClassA, e.g. using reflection?
}
}
Thanks,
Martin
if I have two classes, ClassA and ClassB, and ClassA has a member of
type ClassB, is it possible from within ClassB to find out that the
current instance is a member of ClassA?
Example:
class ClassA
{
private ClassB _myClassB = new ClassB();
}
class ClassB
{
public void FindOwner()
{
// is there some way to find out, that this
// instance is a member of an instance of
// ClassA, e.g. using reflection?
}
}
Thanks,
Martin