Hi just a quick example of removing duplicates from a list object, useful for strings or numbers.
Comments and suggests welcome.

Example

vbnet Code:
  1. Public Class Form1
  2.  
  3.     Private Sub ListRemoveDups(ByVal Source As List(Of String), Optional ByVal MatchCase As Boolean = False)
  4.         'Sort the array
  5.         Source.Sort()
  6.  
  7.         'Do the duplicates remove.
  8.         For x As Integer = Source.Count - 1 To 1 Step -1
  9.             'Check if we want
  10.             If MatchCase Then
  11.                 'Do the check
  12.                 If Source(x).ToLower() = Source(x - 1).ToLower() Then
  13.                     Source.RemoveAt(x)
  14.                 End If
  15.             Else
  16.                 'Do the check
  17.                 If Source(x) = Source(x - 1) Then
  18.                     Source.RemoveAt(x)
  19.                 End If
  20.             End If
  21.         Next x
  22.     End Sub
  23.  
  24.     Private Sub cmdDemo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDemo.Click
  25.         'Remove duplicates from list
  26.         Dim names As New List(Of String)
  27.         'Add some names
  28.         names.Add("Ben")
  29.         names.Add("Ben")
  30.         names.Add("David")
  31.         names.Add("Chris")
  32.         names.Add("David")
  33.         names.Add("Ben")
  34.         names.Add("Chris")
  35.         names.Add("david")
  36.  
  37.         'Match Case
  38.         ListRemoveDups(names, True)
  39.  
  40.         'Display names
  41.         For x As Integer = 0 To names.Count - 1
  42.             MessageBox.Show(names(x), "Demo", MessageBoxButtons.OK, MessageBoxIcon.Information)
  43.             'Return Ben,Chris,david
  44.         Next x
  45.  
  46.     End Sub
  47. End Class