I have two custom classes that we can call "Person" and "Line".

"Line" inherits List(of T) and is basically a List(of Person), with some extra properties and methods.

"Person" has a "Shirt" property that stores the color of their shirt.

Suppose I have a method in "Line" called RedShirt that returns the index of a "Person" that is wearing a red shirt.

How can I access the RedShirt function from a "Person" instance to locate the guy with the red shirt on?


I have already passed a reference to the "Line" instance in the constructor for "Person" and can easily access it this way.
However, because "Line" is a LIST(of Person), I run into trouble when I use serialization and de-serialization to make a deep copy of a "Person" object. I believe each copied "Person" has a reference to the parent "Line" which has references to all the "Person" objects which all reference the "Line" etc.

I am persisting the "Line" to a disk file.
I noticed if I add a New "Person" to the "Line", the file size grows slightly. If I a deep copy a "Person" and add it to the "Line", the file size doubles.

So assuming the serialization deep copy operation in conjunction with the reference to parent list is what is causing my issue, How else might I reference the "Line" methods from a "Person" object to get information on other "Person" objects in the "Line"?

I hope my analogy makes the question easier to understand rather than harder.