Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent Child Relationships
Message
 
À
15/12/2009 00:17:37
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01438981
Message ID:
01439146
Vues:
35
>If both classes are in the same project, there is no circular reference. If they're in different projects, then you won't be able to do it because then it *would* be a circular reference and Visual Studio won't allow that.
>

I didn't think he was asking about project references but actual live object references where each object holds a reference to the other object.

Object 1
-> Reference to Object 2

Object 2
-> Reference to Object 1

>>In C# do I need to worry about the circular reference I've just created?

I haven't had any problems with this (AFAIK the garbage collector handles them just fine since it's not doing straight reference counting). But things like some types of serialization may be a potential problem (if you have that need).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform