Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
VB - Doppelte Arrayeinträge mit linearem Aufwand entfernen
SUBMITTED BY:
TheSwarm
DATE:
Oct. 21, 2015, 8:32 a.m.
FORMAT:
Text only
SIZE:
625 Bytes
Raw
Download
Tweet
HITS:
1807
Go to comments
Report
''' <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
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus