Wednesday, August 3, 2011

LINQ - Aggregate Operators

Below code is to show the unique value:


Public Sub LinqSample1()
    Dim arr
Distinct() = {1, 1, 1, 2, 2, 3, 4, 4, 5, 5}

    Dim strUniqueFactors = 
arrDistinct.Distinct().Count()

    Console.WriteLine(
strUniqueFactors & " is unique value.")
End Sub



Result:
is unique value.

2 comments:

GuildWars2Items said...

Many people in this life deny their freedom Sell WOW Gold, they sit back in their misery and blame it on their parents Sell WOW Gold, or their childhood, their health, or their financial problems Sell WOW Gold.

The past is gone and static. Nothing we can do will change it.scarlet blade gold, the future is before us and dynamic. Everything we do will affect it rs gold, You laugh at mescarlet blade gold for being different , but I laugh at you for being the same.

Hariharan s said...

I have read about linq in asp.net c#
Firstly i got a knowledge about linq in sql server ie,in the form of aggregate operators

http://www.theosoftindia.com/