Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim txt1(textbox1.Text.Split(CType(" ", Char())).Length) As String
- Dim txt2(textbox2.Text.Split(CType(" ", Char())).Length) As String
- txt1 = textbox1.Text.Split(CType(" ", Char()))
- txt2 = textbox2.Text.Split(CType(" ", Char()))
- Dim diff1 As String = "" 'Differences between 1 and 2
- Dim diff2 As String = "" 'Differences between 2 and 1
- For Each diff As String In txt1
- If Array.IndexOf(txt2, diff.ToString) = -1 Then
- diff1 += diff.ToString & " - "
- End If
- Next
- For Each diff As String In txt2
- If Array.IndexOf(txt1, diff.ToString) = -1 Then
- diff2 += diff.ToString & " - "
- End If
- Next
- Response.Write("Difference in First To Second: " & diff1 & vbNewLine & "Difference in Second To First: " & diff2)
Add Comment
Please, Sign In to add comment