15
1
Option Strict On
2
Imports System
3
Imports System.Linq
4
Public Module Module1
5
Public Sub Main()
6
'Create a collection that has multiple duplicate values
7
Dim nonunique() As String = {"David", "David", "Michael", "Stephen", "David"}
8
9
'Iterate through all unique value in the collection
10
For Each value As String In nonunique.Distinct()
11
'Print the value
12
Console.WriteLine(value)
13
Next
14
End Sub
15
End Module
Cached Result