1
Answer

How can I copy the list and Clone every object inside?

Sudha Shankar

Sudha Shankar

2y
521
1

Lists because of ToList() now are different. But objects inside still same and changes translates to other list. How can I copy the list and Clone every object  inside? ps: Last line outputs X

use linq something like select(u => (User)u.Clone()) ?
upd: that's worked, but is there a better solution?

Answers (1)