In one case i have to right a method to remove duplication from array of strings. i write this code Public Function RemoveDuplicates(ByVal items As String()) As String() Dim noDupsArrList As New ArrayList() For i As Integer = 0 To items.Length - 1 If Not noDupsArrList.Contains(items(i).Trim()) Then noDupsArrList.Add(items(i).Trim()) End If Next Dim uniqueItems As String() = New String(noDupsArrList.Count - 1) {} noDupsArrList.CopyTo(uniqueItems) Return uniqueItems End Function
How to remove duplicate from string array in .net
Previous post: What is Kerbala! In the eye of Leaders of the World.
Next post: European english
Comments on this entry are closed.