The following code shows you how to skipping elements in array. For example array contains {2,1,4,5,7} and you want output like this {5,7} only, then after applying LINQ Skip() method you can achieve this. See the code below.
Dim numbers() As Integer = {59, 82, 70, 56, 92, 98, 85}
Dim query = numbers.Skip(3)
For Each i In query
Console.Write(i.ToString() & " ")
Next
Output of the program is:
56 92 98 85 (because starting from 0, first three elements are skipped)
0 comments:
Post a Comment