[英]How to touch the same object from 2 lists… (References)
I have problem, I wanna make 2 or 3 lists of objects of my own class, but wanna be sure that some of object can be in more lists. 我有问题,我想列出自己类的2或3个对象列表,但要确保某些对象可以位于更多列表中。 So I wanna have 2 lists of objects with attributes (objects are instances of the same class MyClass) But I wanna be sure that if I will edit some attributes in object1, and when I will open ListB, I wanna be sure that, that attributes from that edit will be avaible from listB.
所以我想有2个带有属性的对象列表(对象是MyClass相同类的实例),但是我想确保如果我将在object1中编辑一些属性,并且当我打开ListB时,我想确定那个属性该编辑将可从listB获得。 I am not sure how it will be with references.
我不确定引用会如何。 C# Do you have some solution???
C#你有解决方案吗? thanks
谢谢
For example: 例如:
ListA: ListA:
ListB: 清单B:
如果在listA和listB中都有object1的副本,则在同一位置编辑它都无所谓。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.