I am trying to make a deep copy by adding a clone property to my class.
My Problem is that the properties of MyOtherClass do not copy even though the properties of MyClass do copy properly.
What am I missing?
Code:
Public Class MyClass
Implements ICloneable
Public Property Foo as String
Public Property Poo as MyOtherClass
Public Function Clone() as Object Implements System.ICloneable.Clone
Return new MyClass With {.Foo = Foo, .Poo = Poo.Clone}
End Function
End Class
Public Class MyOtherClass
Implements ICloneable
Public Property FooYoung as Byte()
Public Property Cookie as String
Public Function Clone() as Object Implements System.ICloneable.Clone
Return New MyOtherClass With {.FooYoung = FooYoung, .Cookie = Cookie}
End Function
End Class
What am I missing?
Comment