Σταύρο τη γνώμη σου :
O Constructor του Parent ob :
Public Sub New(ByVal FName As String, ByVal FSurname As String, ByVal FChildren As Children)
_OName = FName
_Name = _OName
_OSurname = FSurname
_SurName = _OSurname
_Children = FChildren
_OChildren = CType(_Children.Clone, Children)
End Sub
και το implementation του Clone method στο Children collection :
Public Function Clone() As Object Implements System.ICloneable.Clone
'Deep Clone of Children collection
Dim CClone As Children = New Children
Dim NewChild As Child
For Each ExistingChild As Child In Me
NewChild = New Child(ExistingChild.Name, CClone)
CClone.AddChild(NewChild)
Next
Return CClone
End Function
Πάνος Αβραμίδης