Hello I am having troubles with my application. I am trying to load a list into listbox1 and then refresh the same list in listbox2 (but with possibly different results) and then compare the two and display in textbox1 the differences between the two list boxes. I have gotten to a point where I am able to tell if there are differences but when it goes to post into the textbox it displays the entire listbox and not the differences.
That's a little wordy. Sorry. Below is my code:
TextBox1.Text = ""
Dim Folder As String = My.Settings.path
ListBox2.Items.Clear()
For Each File As String In My.Computer.FileSystem.GetFiles _
(Folder, FileIO.SearchOption.SearchAllSubDirectories)
ListBox2.Items.Add(IO.Path.GetFileName(File))
Next
' This is where the issues is - The system compares the items and displays all items in the textbox.
For Each item In ListBox1.Items
If item.ToString = ListBox2.Items.ToString Then
Else
TextBox1.Text += (Environment.NewLine + item.ToString)
End If
Next
Thanks for your help.