Sudha Shankar

Sudha Shankar

  • NA
  • 17
  • 2k

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

Sep 29 2022 5:41 AM

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)