Quantifiers Any: determine if any of the words in the array contain the substring 'th' : Any « LINQ « VB.Net Tutorial






Imports System.IO
Imports System.Reflection
Imports System.Linq
Imports System.Xml.Linq

Public Class MainClass
   Public Shared Sub Main

        Dim words() As String = {"this", "is", "a", "test"}

        Dim iAfterE = Aggregate word In words _
                      Into Any(word.Contains("th"))

        Console.WriteLine("There is a word that contains in the list that contains 'ei': " & iAfterE)
   End Sub


End Class








12.6.Any
12.6.1.Quantifiers Any: determine if any of the words in the array contain the substring 'th'
12.6.2.Alternative Syntax Quantifiers Any