Imports System
Imports System.Collections.Generic
Public Class Program
Public Shared Sub Main()
Dim list As List(Of Integer) = New List(Of Integer) From {
3,
7,
8,
91,
99,
10,
-5,
1,
2
}
Dim indexToUpdate As Integer = 2
Dim newValue As Integer = 8497
list(indexToUpdate) = newValue
Console.WriteLine(String.Join(", ", list))
End Sub
End Class
' run:
'
' 3, 7, 8497, 91, 99, 10, -5, 1, 2
'