Skip to content

Instantly share code, notes, and snippets.

@gusmantap
Created November 3, 2021 11:30
Show Gist options
  • Save gusmantap/2b71e00f3b6701fbc111cb100a728c47 to your computer and use it in GitHub Desktop.
Save gusmantap/2b71e00f3b6701fbc111cb100a728c47 to your computer and use it in GitHub Desktop.
private void handleFilterDuplicate() {
this.lists.Clear();
listAll.Items.Clear();
for (int i = 0; i < list1.Items.Count; i++ )
{
string a = list1.Items[i].ToString();
Console.WriteLine(a);
if (isNumExist(Int32.Parse(a)) == false)
{
this.lists.Add(Int32.Parse(a));
}
}
for (int i = 0; i < list2.Items.Count; i++)
{
string a = list2.Items[i].ToString();
if (isNumExist(Int32.Parse(a)) == false)
{
this.lists.Add(Int32.Parse(a));
}
}
this.lists.ForEach(item =>
{
listAll.Items.Add(item);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment