Guest User

Untitled

a guest
Feb 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Dim txt1(textbox1.Text.Split(CType(" ", Char())).Length) As String
  2. Dim txt2(textbox2.Text.Split(CType(" ", Char())).Length) As String
  3. txt1 = textbox1.Text.Split(CType(" ", Char()))
  4. txt2 = textbox2.Text.Split(CType(" ", Char()))
  5.  
  6. Dim diff1 As String = "" 'Differences between 1 and 2
  7. Dim diff2 As String = "" 'Differences between 2 and 1
  8.  
  9. For Each diff As String In txt1
  10. If Array.IndexOf(txt2, diff.ToString) = -1 Then
  11. diff1 += diff.ToString & " - "
  12. End If
  13. Next
  14.  
  15. For Each diff As String In txt2
  16. If Array.IndexOf(txt1, diff.ToString) = -1 Then
  17. diff2 += diff.ToString & " - "
  18. End If
  19. Next
  20. Response.Write("Difference in First To Second: " & diff1 & vbNewLine & "Difference in Second To First: " & diff2)
Add Comment
Please, Sign In to add comment