Below code is to show the unique value:
Public Sub LinqSample1()
Dim arrDistinct() = {1, 1, 1, 2, 2, 3, 4, 4, 5, 5}
Dim strUniqueFactors = arrDistinct.Distinct().Count()
Console.WriteLine(strUniqueFactors & " is unique value.")
End Sub
Result:
3 is unique value.