How can I remove my duplicates in the List(Of String)? I was under the assumption that it could work with List(Of T).Distinct, but my result says o
Function RemoveDuplicate(ByVal TheList As List(Of String)) As List(Of String)
Dim Result As New List(Of String)
Dim Exist As Boolean = False
For Each ElementString As String In TheList
Exist = False
For Each ElementStringInResult As String In Result
If ElementString = ElementStringInResult Then
Exist = True
Exit For
End If
Next
If Not Exist Then
Result.Add(ElementString)
End If
Next
Return Result
End Function