anthony.yaghi
New member
- Joined
- Dec 10, 2013
- Messages
- 2
- Programming Experience
- Beginner
Hello guys, this is my first post in here and unfortunately I am already asking question instead of helping
Here is the thing, I am coding an application that will need to check 2 lists of file names, lets say list1 and list2, than return the missing files in list2.
It should be pretty easy but I am having a problem, after splitting the the lists in 2 String arrays
list1--->updates()
list2--->installs()
Here is the problem, I am using this code to compare each string in updates to all strings in installs to see if any 2 matches (uplist is a textbox) :
the strings in updates are: doc1.docx LabBio.msi projection.pptx tex.txt
the strings in installs are: tex.txt
And here is what I am getting :
You can see that it gives me "tex.txt not equals tex.txt", so I guess I am not using the String.Equals() the right way, I tried comparing them with "=" or "<>" but noting works.
Can anyone help figure out the problem ?
Here is the thing, I am coding an application that will need to check 2 lists of file names, lets say list1 and list2, than return the missing files in list2.
It should be pretty easy but I am having a problem, after splitting the the lists in 2 String arrays
list1--->updates()
list2--->installs()
Here is the problem, I am using this code to compare each string in updates to all strings in installs to see if any 2 matches (uplist is a textbox) :
VB.NET:
For i As Integer = 0 To (updates.Length - 1)
For j As Integer = 0 To (installs.Length - 1)
If (Strings.Equals(updates(i), installs(j))) = False Then
uplist.Text += updates(i) + " not equals " + installs(j) + vbNewLine
Else
uplist.Text += updates(i) + " = " + installs(j) + vbNewLine
End If
Next
Next
the strings in installs are: tex.txt
And here is what I am getting :
VB.NET:
doc1.docx not equals tex.txt
LabBio.msi not equals tex.txt
projection.pptx not equals tex.txt
tex.txt not equals tex.txt
Can anyone help figure out the problem ?