Custom Classes within Custom Classes

  • I will try to explain this as clearly and concisly as possible. I have a list that contains unique batches with various attributes. One of thes attributes is a parent batch. The parent batch may or may not be populated, is not necessarily unique, and in no certain order. My end goal is to determine each unique batch that shares a parent batch with any of the other unique batches, and collect some information for those batches. What I want to do is loop through the list and find each parent batch, create a new object of custom class clsParent, and add the unique batch as an object of custom clsChild as a collection of the parent object. The problem I am running into is that once I add a child to the parent, I don't know how to recall that parent at a later time to add another child. I would appreciate any guidance on the matter and can provide additional detail as needed.