Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class referencing itself
Message
 
 
General information
Forum:
C#
Category:
Class design
Miscellaneous
Thread ID:
01658720
Message ID:
01658738
Views:
30
>Nothing wrong, in principle, with a class containing a list of it's own instances but if, as you discovered, if it recursively passes an instance that has already been processed you will end up in an infinite loop.
>Either, as you mentioned, limit the recursion count or, maybe better depending on the expected structure, check that an item has not already been processed.

I'm thinking that something is wrong with my local data because I'm not reproducing this error in two other test environments or with other rows. May be I should just delete this bad instance for now and watch out if I can reproduce in a future.

UPDATE. Found I had two root elements (not sure how that happened). I deleted the bad row and will be testing it now.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform