Shallow copy is when i write new List<List<ClassA>>(lsA)
which just copies the member ls. So shallow copies the first list while the inner list is not. Since MyList has access to each T being put in (which its just piping through with C#'s List in this example) it can do a shallow copy each of those. So now all the members of MyList is being copied and the variables it can directly access.
What kind of copy is this? Its only doing a shallow copy on its inner vars so this isnt a deep copy? since its copying vars it can touch and not just a memberwise vars its no longer a shallow copy. Is this type of copy called something? also is it bad practice since it is not a deep copy and possibly no more useful then a shallow copy?
class ClassA { int a; }
class MyList<T> { List<T> ls; /*i cheat */ }
MyList<MyList<ClassA>> lsA;