My code

list1.AddRange(list2);
foreach (var item in list2)
{
    item.Value--;
}

when I change the value in list2, the values added to list1 before are also changed

how can the value in list1 not be changed?

0

There are 0 best solutions below