Why does changing one list also modifies another?

前端 未结 0 1308
执念已碎
执念已碎 2020-12-01 04:18

In my c# program , i have a List a , and List b. Whenever i populate my list a using : a.Add(myobject) and copy this list to list b b = a , changes in list b affect list a.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题