I have a List of IWord objects named taggedInput.
I need to associate each element with its own List of IWord objects.
For this I need to use a different datatype.
In this datatype, both the parent list and the child list must be dynamic, and must be populated at run-time.
The parent list must allow duplicate values (so it cannot be a Dictionary object).
I intend to iterate through the parent list, and manipulate (add, remove, reorganize) the elements in the child list. Each element in both the parent and child lists must be accessible by its position in the list.
Here is an image I made to better illustrate what I need:

What is the best data type to use for this? I need something like List<IWord,List<IWord>>
(but that wouldn’t be a list)
I am assuming you cannot change the
IWordinterface? In that case I would use another type to allow you to form the required relationship …Then you simply require a list of the above
You could also make
WordWithRelativesimplementIWordby forwarding theIWordinterface methods to theWordinstance it contains.