t> It's possible to avoid circular references like in C++?
If you mean that object A has reference on B and B has reference on A;
or even A->C->B B->A - then answer is no, beacause it depends on application architecture.
Circular references can sometimes suggest a design flaw. However,
there is a good article on an msdn blog describing the use of a common
interface to resolve the conflict:
If you talk about c++ forward declarations , no there is no such a thing in
c#. Using conditional compilation in header files doesn't work for C# either
because metadata are in the assembly itslef.
If two assemblies are referenced each other you need to get the common types
and move them in separate assembly. Then both dll will reference this
assembly. You can also create assembly declaring interfaces for the common
types and use them in your other dlls instead of actual types.
--
HTH
Stoitcho Goutsev (100)
"tomb" <+_prquamurt_+@ gmail.com> wrote in message
news:43f1e2f6$1 _1@x-privat.org...[color=blue]
> VS2005.
>
> It's possible to avoid circular references like in C++?
>[/color]
Comment