利用ArrayList去重

利用ArrayList去重

ArrayList jhd = new ArrayList();
 for (int i = 0; i < dgv_OutBoundOrder.RowCount; i++)
      {
              if (dgv_OutBoundOrder.Rows[i].Cells["chk_choose"].EditedFormattedValue.ToString().ToUpper().Equals("TRUE"))
                {
                        jhd.Add(dgv_OutBoundOrder.Rows[i].Cells["PickingGoodsID"].Value.ToString());
                }
      }

List<object> list = jhd.ToArray().Distinct().ToList();//去重

原文地址:https://www.cnblogs.com/feifu/p/3274677.html