I have class with a List
member. If I want to clone an instance of this class, do I need a deep copy or the MemberwiseClone()
shallow co
Short answer, yes.
Long answer, you need to determine what the copy in your case actually means with respect to the list. Do you need a copy of the contents of the list as well? For value types like ints, its pretty straight forward, if it were reference types though....yo have some questions to ask regarding what you want your list to contain.