VB.NET - LINQ Cheat sheet to get minimum value



LINQ to get min value

Public Sub getMinValue()
   ' Dim products = GetProductList()

    Dim categories = From p In products 
          Group p By p.Category Into Group 
          Select Category, CheapestPrice = Group.Min(Function(p) p.UnitPrice)
    End Sub

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.