473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Circular Reference problem..

Class A stores in assembly a.dll
Class B stores in assembly b.dll

Class A would like to reference a class b object and
class B would also like to reference a class a object
e.g.
Class A
{
private B;
}

Class B
{
private A;
}

how can it be done?
coz i need to add reference to both project before I can compile them,
but I won't able to create the dll for both classes without compiling
them.....
so...

thx..
Nov 15 '05 #1
2 1343
"babylon" <am***@hotmail.com> wrote in message news:#m*************@TK2MSFTNGP10.phx.gbl...
You can't do this but there are way around it. One method is to have one class keep a reference to the other as object (probably not
what you are after). The other method is to have one of the classes implement an interface that is defined in the other dll. That
way the interface for class A and class B are both defined in the same dll so both classes can each other.

--
Michael Culley
Nov 15 '05 #2
icic...thx!
"Michael Culley" <mc*****@NOSPAMoptushome.com.au> wrote in message
news:et**************@TK2MSFTNGP09.phx.gbl...
"babylon" <am***@hotmail.com> wrote in message news:#m*************@TK2MSFTNGP10.phx.gbl... You can't do this but there are way around it. One method is to have one class keep a reference to the other as object (probably not what you are after). The other method is to have one of the classes implement an interface that is defined in the other dll. That way the interface for class A and class B are both defined in the same dll so both classes can each other.
--
Michael Culley

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vera | last post by:
I have two assemblies that each consist of several classes. Each object instantiated from those classes can have one or more child- and/or parentobjects that are also instantiated from those...
1
by: dotnetnewbie | last post by:
Hi all I am new to .NET and webservice so I wish someone can shed some light on me. I have a Project class and a Product class, the Project can contain multiple Products (as an ArrayList). In...
11
by: Steve Jorgensen | last post by:
I just came up with a really tidy little solution to the VB/VBA circular reference issue. It only works with Access 2000 or newer, but that's about the only down-side. The issue... You need an...
6
by: T Koster | last post by:
After a few years of programming C, I had come to believe that I finally knew how to correctly organise my structure definitions in header files for mutually dependent structures, but I find myself...
4
by: Henke | last post by:
I have this scenario. public class A { public int numbers; public class A() { }
12
by: Frank Rizzo | last post by:
I have a circular reference between 2 classes in the same project (i.e. each class refers to the other). The app runs fine and I am seeing no issues, which kind of surprised me. Are there any...
6
by: Stephen Robertson | last post by:
We are currently in a dead end with a circular reference issue using vb.net, and are hoping someone might help us resolve it. Idea... We have frmmain calling frmperson (dim f as new frmperson)...
3
by: Solution Seeker | last post by:
Hi All, I am here with a Query and need a Solution for it. The Query is as Follows, We have 3 Projects in a Solution - Say UI, CMN and PRD First One Deals with UI Forms Second One Deals...
2
by: Jeremy Kitchen | last post by:
I have inherited a project and I am trying to figure out why the failing units tests that exist fail. I a, getting the following error when I attempt serialization. Any advice on what I should...
3
by: =?Utf-8?B?UGF1bCBIYWxl?= | last post by:
Moving all User Controls to a single directory has solved my problem - Thanks Eliyahu. That said, I still got one Circular ref error yesterday, rebuilt again and the build was fine? Far far...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.