using System;
using System.Collections.Generic;
class Program
{
static void Main() {
List<int> list = new List<int> { 3, 7, 8, 91, 99, 10, -5, 1, 2 };
int indexToUpdate = 2;
int newValue = 8497;
list[indexToUpdate] = newValue;
Console.WriteLine(string.Join(", ", list));
}
}
/*
run:
3, 7, 8497, 91, 99, 10, -5, 1, 2
*/