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.
Wednesday, August 3, 2011
LINQ - Aggregate Operators
Posted by Emil Chang at 9:37 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment