You only assign the reference of your first list addadAttachments
to a new variable, but don't create a new list.
To create a new list simply call
List<string> tempList = new List<string>(addedAttachments);
The order of the strings in the lists stays the same.
But note that this is only appropriate for immutable types like string
. With a list of complex mutable objects, you would add the same objects to the new list, so if you change properties of an object in the old list, the "object in the new list" is also changed (it is the changed object). So you might also need to copy the objects.