Element Operators First : First « LINQ « VB.Net






Element Operators First

  

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

Public Class MainClass
   Public Shared Sub Main

        Dim strings = New String() {"zero", "one", "two"}

        Dim FirstO = strings.First(Function(s) s(0) = "o"c)

        Console.WriteLine("A string starting with 'o': " & FirstO)
   End Sub


End Class

   
    
  








Related examples in the same category

1.Using First to return the first matching element
2.Element Operators First
3.Alternative Syntax for First Operator