This is my code, but everytime i try compiling it i keep getting this error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
using System;
using System.Collections.Generic;
using System.IO;
namespace nrinfile
{
class Program
{
static void Main(string[] args)
{
List<int> numbers= new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
string[] folderLoc = File.ReadAllLines(@"E:\folder\numbers.txt");
for (int i = 0; i < 12; i++)
{
folderLoc[i] = Convert.ToString(numbers[i]);
}
}
}
}`