Remove Items Duplicate ListView C #

0

I would like to remove items that have the same title, as the image demonstrates, but I would like to do after the items are listed in the listview.

I could not do anything because the title can be the same but the links do not, and this meant that I could not use ".Distinct ()"

Thank you

Thecodeofhowtheyareaddedinthelistview.

List<string>links=newList<string>();List<string>titles=newList<string>();List<string>links1=newList<string>();List<string>titles1=newList<string>();privatevoidbtSearch_Click(objectsender,EventArgse){if(txSearch.Text.Length!=0){ScanServe();for(inti=0,j=0,r=0;i<titles.Count&&j<links.Count&&r<sizes.Count;i++,j++,r++){stringjuntos=titles[i].ToString()+";" + links[j].ToString() + ";" + sizes[r].ToString();
                string texto = ".mp3";
                string texto2 = titles[i].ToString();

                if (juntos.Contains(texto))
                {
                    string[] split = juntos.Split(';');

                    titles1.Add(split[0].ToString());
                    links1.Add(split[1].ToString());
                    sizes1.Add(split[2].ToString());
                }
            }
            for (int q = 0, w = 0 ,z = 0; q < titles1.Count && w < links1.Count && z < sizes1.Count; q++, w++, z++)
            {
                listView1.Items.Add(new ListViewItem(new string[] { titles1[q], links1[w],sizes1[z] }));
            }
        }
    }
    
asked by anonymous 22.06.2014 / 10:23

0 answers