Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cross reference

1 view
Skip to first unread message

Gomez

unread,
Nov 16, 2008, 1:13:37 PM11/16/08
to
I encounter a problem in which I need to implement a cross reference by 2
projects(I'm not sure even if its the correct description, but actually each
project needs to call the partners methods, so each has to refer to the
other assembly).
Of course, the problems arises in the compilation order.
Is there a standard solution to that?
Regards
Gomez


Duggi

unread,
Nov 16, 2008, 1:27:15 PM11/16/08
to

I did not exactly got the issue you are facing, However I think
exploring Project->BuildOrder..will sove you your issue,

-Cnu

Peter Duniho

unread,
Nov 16, 2008, 3:35:25 PM11/16/08
to

I would call that situation a "circular reference" or "circular
dependency". You can accomplish it if you compile from the command-line,
but I believe that in the IDE it's not possible. It would be better to
refactor your code so that the circular dependency doesn't exist. Having
a circular dependency will always make your code more complicated and more
costly to maintain.

Without seeing a concise-but-complete code example that sufficiently
illustrates this circular dependency in your actual code, it's impossible
to know what the best approach would be. But generally, this sort of
thing can be addressed by using callbacks (i.e. delegates, either as
parameters, properties, or events) or interfaces (you may find it useful
or necessary to declare the interface in some commonly-referenced
assembly), both of which allow one assembly to call methods in another
without actually having to reference that other assembly.

Pete

0 new messages