Using Skip to get all but the first 4 elements of the array : Skip « LINQ « VB.Net






Using Skip to get all but the first 4 elements of the array

  

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 allButFirst4Numbers = From num In numbers Skip 4

        Console.WriteLine("All but first 4 numbers:")
        For Each n In allButFirst4Numbers
            Console.WriteLine(n)
        Next

   End Sub


End Class

   
    
  








Related examples in the same category

1.Using Skip to get all but the first 2
2.Using Skip While to get elements divisible by 3