>Sometimes when creating a parent child relationship the child may need to know who it's parent is.
>
>I can do that easy enough by passing the parent reference in the constructor for the child.
>
>In C# do I need to worry about the circular reference I've just created?
Not 100% sure of your context. Bonnie mentioned the problem with assemblies but I think you're asking about simple objects like:
public class ClassA
{
ClassB B;
public ClassA(ClassB b)
{ B = b; }
}
public class ClassB
{
ClassA A;
public ClassB()
{A = new ClassA(this);}
}
If so then there's not a problem. See:http://msdn.microsoft.com/en-us/library/0t81zye4(VS.71).aspx
Best,
Viv