I have built an array, as follows
Code:
Dim aPages(8) As String
aPages(0) = 1
aPages(1) = 2
aPages(2) = 3
aPages(3) = MaxPages - 2
aPages(4) = MaxPages - 1
aPages(5) = MaxPages
aPages(6) = Math.Max(CurrentPage - 1, 0)
aPages(7) = CurrentPage
aPages(8) = Math.Min(CurrentPage + 1, MaxPages)
Keeping things as simple as possible, I need to remove any duplicates from the list and to sort the list.
Any help appreciated