بسم الله الرحمن الرحيم ، الكود التالي ان شاء الله يفي بالغرض
PHP كود :
Public Class Form1
Dim x As Integer
Dim myList As New List(Of Integer)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
x = 0
myList.Clear()
TextBox2.Clear()
Dim arr As Array = TextBox1.Text.Split(" ").ToArray
For i = 0 To arr.Length - 1
If myList.Contains(i) Then Continue For
For j = 0 To arr.Length - 1
If arr(i) = arr(j) Then
x += 1
myList.Add(j)
End If
Next
TextBox2.Text &= x
x = 0
Next
End Sub
End Class
