Is there an easier/tidier way to deep clone a list of reference types that do not implement ICloneable.
Currently have been looping through each object in the list like so:
Dim myListCopy As New List(Of ListObj)
For Each lo As ListObj In MyList
myListCopy.Add(lo.ShallowCopy)
Next
The object ListObj contains only value types and returns a shallow memberwise.
This works however I cam across this post here: http://stackoverflow.com/questions/222598/how-do-i-clone-a-generic-list-in-c
I don't really understand whats going on in the Extension, is it possible to the shollowCopy function to an extension and avoid iteration?