arraylist使用

/################# //去重复及字符串
               DataGridView  dgv_record;
            ArrayList list = new ArrayList();
             //去重复及字符串" "
            for (int i = 0; i < dgv_record.Rows.Count; i++)
            {

                if (!list.Contains(dgv_record.Rows[i].Cells[cellname].Value.ToString().ToLower()))
                {
                    if (!dgv_record.Rows[i].Cells[cellname].Value.ToString().ToLower().Equals("&nbsp;"))
                    {
                        list.Add(dgv_record.Rows[i].Cells[cellname].Value.ToString());
                    }

                }


            }

你可能感兴趣的:(ArrayList)