Link to home
Start Free TrialLog in
Avatar of Jess31
Jess31

asked on

Find value in LINQ result ?

I have this statement that returns ISBN and Price. How can I look up values on this result?

        Dim z = From ISBN In dt Group ISBN By ISBN = ISBN.Field(Of String)("ISBN") Into ISBNGroup = Group
                Select New With {.ISBN = ISBN,
                    .MaxPrice = ISBNGroup.Max(Function(Guides) Guides.Field(Of Decimal)("GuidePrice"))
                    }

Open in new window

SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jess31
Jess31

ASKER

How can I lookup the ISBN but return the Price ?
Hi Jess31;

Something Like this should work.
			
Dim searchISBN = "Some ISBN Here"			
Dim z2 = (From ISBN In z
          Where ISBN.ISBN = searchISBN
          Select ISBN.MaxPrice).FirstOrDefault()

Open in new window

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial