更新时间:2022-11-20 23:33:57
比起深度复制,你***的打赌可能是锁定集合:
Other than doing a deep-copy your best bet might be to lock the collection:
List<string> theList = (List<String> )callingForm.Invoke(callingForm.delegateGetKillStrings);
lock(theList.SyncRoot) {
foreach(string s in theList) {
// Do some Jazz
}
}