Материал из VB Эксперт
Перейти к: навигация, поиск

Build a query expression using extension methods granted to the Array via the Enumerable type


Module Program
  Sub Main()
    Dim currentVideoGames() As String = {"A", "B", "this is a test", "C", "D", "E"}
    Dim subset = currentVideoGames.Where(Function(game) game.Length > 6).OrderBy(Function(game) game).Select(Function(game) game)
    For Each game In subset
      Console.WriteLine("Item: {0}", game)

  End Sub

End Module