【发布时间】:2011-07-07 02:14:45
【问题描述】:
Dictionary <string, List <SaleItem>> saleItemNew = new Dictionary<string, List< SaleItem>> ();
saleItems = new List <SaleItem> ();
saleItemNew.Add("1", saleItems);
此时字典中的列表有值了。
saleItems.Clear();
但是,当我清除之前分配给它的列表时,字典的值 List 现在是空的...为什么?
【问题讨论】:
标签: c# dictionary