Use SkipWhile to get all elements starting from first element less than its position : SkipWhile « LINQ « VB.Net






Use SkipWhile to get all elements starting from first element less than its position

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

Public Class MainClass
   Public Shared Sub Main

        Dim numbers() As Integer = {5, 4, 1, 3, 9, 8, 6, 7, 2, 0}

        Dim laterNumbers = numbers.SkipWhile(Function(n, index) n >= index)

        
        For Each n In laterNumbers
            Console.WriteLine(n)
        Next

   End Sub


End Class

   
    
  








Related examples in the same category