当我从集合中删除项目时,.net 端发生了什么?对删除项目的引用仍然有效吗?
class myObject
{
int i = 1;
}
...
public ObservableCollection<myObject> myObjects = new ObservableCollection<myObject>();
...
myObjects.Add(new myObject());
myObjects.Add(new myObject());
myObject removedItem = myObjects[1];
myObjects.RemoveAt(1);
// removedItem still valid ?