Using First Function of Linq
Thsi VB sample code shows different Ways to retrive first element of an array using LINQ.
Dim names() As String = {"Hefin", "Abbas", "Mathew", "Sam", "Anthony"}
Dim first = names.First() 'Method One
Dim firstA = names.First(Function(n) n(0) = "A") 'Gets the first element that starts with "A"
'n(index) decides which character matches n(0) means first
Console.WriteLine("First Element is : " & first)
Console.WriteLine("First Element That Starts with A is : " & firstA)
Requires .net Framework 3.5
Regards Hefin Dsouza