First of all, do not create Newa customer list if you are just going to designate another list for the link in the next line. This is a little stupid. Do it like this:
Dim customers As List(Of Customer) = dataAccess.GetCustomers()
Then for the loop, you need a simple "For" loop, not a for each. Remember to stop to the end of the list:
For i As Integer = 500 To Customers.Count -1
'do something with Customers(i) here
Next i
If you are using Visual Studio 2008, you can also write it like this:
For each item As Customer in Customers.Skip(500)
'Do something with "item" here
Next
source
share