Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Are cross references possible?

Back when I wrote C++, there was no way to have references to objects which also referenced the original object. But is this stil true in C#?

I am, for the first time, breaking up my main project into various namespaces and projects, for a variety of reasons. But I am having trouble when certain objects reference many other object types.

Can anny C# progject contain a reference to any other C# project? Or wouldn't this create a circular reference?

Curious.

newbieweb
ASKER CERTIFIED SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

I don't want to use circular dependencies, but I have a problem. I started building this Windows WinForms program years ago, as my first C# program, after years of C++. The concept of namespace was new and I did not adopt it. And as the sole programmer, it didn't much matter. But the application has grown over many years, and still uses one single namespace. So I have to give any developer the whole source code base, and that's kept me shy about having subcontractors help me.

I am trying to break the probecyt up but it seems like it will be a complex task. I create an object called Handles, and made is a centtral object throughout the program. Almost every object used Handles since it's a catch all for references to every important object in the program. Also, that's where the exception handleer code originates, which is another reason for the Handles object being referenced by practially everything.

So I'm in a pickle. Any suggestions?

Is there a common object, like ASP.NET, where I can store my own object types? That might help me untangle some of the intermarriages of many of these objects, but for the type to be addressable is still another issue.

I'm really in an pickle since I'm try9ing to get stated with what will be a new version. But given I have a very short time to finish it, must start with the earlier version as a starting point.

Please let me hear your opinions.

Thanks,
newbieweb
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think I need to rewrite this whole thing. But later.

Thanks.