
Here’s a function that will remove duplicate items in a array. The code is for VB.net.
The code:
Function RemoveDuplicates(ByVal initialArray As String())
Dim i As Integer
Dim j As Integer
Dim newArray(0) As String
For i = 0 To UBound(initialArray)
For j = 0 To UBound(initialArray)
If Not initialArray(i) = "" Then
If Not j = i Then
If initialArray(i) = initialArray(j) Then
initialArray(j) = ""
End If
End If
End If
Next
Next
j = 0
For i = 0 To UBound(initialArray)
If Not initialArray(i) = "" Then
ReDim Preserve newArray(j)
newArray(j) = initialArray(i)
j += 1
End If
Next
Return newArray
End FunctionRelated posts:

VB.net: Auto Scroll a Listbox
Do you want to make a Listbox in VB.net auto scroll to the l...

Download website source code with VB.net
This is a simple guide about how to download a websites sour...

Loop through every letter in string in VB.net
This is a tiny bit of code that will loop and display each l...
