I have a list that I want to copy to another list.
I have 'employeeAddressDataToSave' List and I want to copy this list to 'employeeAddressDataToSaveReturn' List.
I'm using the following code to do that. After I set this, further down the road, I'm updating employeeAddressDataToSave List. Those changes are automatically getting to 'employeeAddressDataToSaveReturn' list. I don't want my employeeAddressDataToSaveReturn list to be updated with changes to employeeAddressDataToSave . Is there a way to do that?
employeeAddressDataToSaveReturn = new List<Address>(employeeAddressDataToSave);