using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
List<int> list = new List<int>();
int listIndexToRemove = 4;
for(int i = 0; i < list.Count; i++)
if(list[i] == listIndexToRemove)
list.Remove(list[i]);
}