I have a list of 8200 items in a graphicList. I need to sort and remove duplicates from this list and get the unique values out. I've tried the function below but it's not working.
Here's the code I was using:
Private Sub RemoveDupes(ByRef Items As List(Of String), Optional ByVal NeedSorting As Boolean = False)
Dim Temp As New List(Of String)
'Remove Duplicates
For Each Item As String In Items
'Check if item is in Temp
If Not Temp.Contains(Item) Then
'Add item to list.
Temp.Add(Item)
End If
statusText = "Removing Duplicate Images in List"
Next Item
'Send back new list.
Items = Temp
End Sub