1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
''' <summary>
''' Diese Funktion löscht mit linearem Aufwand doppelte Einträge aus einem List(Of T) Array
''' </summary>
''' <param name="List">Das Array dessen doppelte Einträge gelöscht werden sollen</param>
Public Function RemoveDoubleItems(ByVal List As List(Of String)) As List(Of String)
Dim KeyList As New Generic.Dictionary(Of String, String)
Dim NewList As New List(Of String)
For Each Item As String In List
If KeyList.ContainsKey(Item) = False Then
KeyList.Add(Item, String.Empty)
NewList.Add(Item)
End If
Next
Return NewList
End Function
|