Currently I have an array of 600 months (January to December) and I wanted to create a new array of int's based off of the initial array.

currently I have ( Ignore any Legacy. as im calling the arrays from a diffrent class)

```
       for (int i = 0; i < Legacy.Month1.Length; i++)
        {

            int[] MonthNo1 = new int[Legacy.Month1.Length];

            switch (Legacy.Month1[i])
            {
                case "January ":
                    MonthNo1[i] = 1;
                    break;
                case "February ":
                    MonthNo1[i] = 2;
                    break;
                case "March ":
                    MonthNo1[i] = 3;
                    break;
                case "April ":
                    MonthNo1[i] = 4;
                    break;
                case "May":
                    MonthNo1[i] = 5;
                    break;
                case "June ":
                    MonthNo1[i] = 6;
                    break;
                case "July ":
                    MonthNo1[i] = 7;
                    break;
                case "August ":
                    MonthNo1[i] = 8;
                    break;
                case "September ":
                    MonthNo1[i] = 9;
                    break;
                case "October":
                    MonthNo1[i] = 10;
                    break;
                case "November":
                    MonthNo1[i] = 11;
                    break;
                case "December ":
                    MonthNo1[i] = 12;
                    break;
            }

            for (int j = 0; i < MonthNo1.Length; j++)
            {

                Console.WriteLine(MonthNo1[j]);

            }

```

Unfortunately this doesn't seem to work.

It successfully outputs the first converted number, but the other 599 are all blank. On top of that at the end of the process, I get exception

> 
> System.IndexOutOfRangeException
> 
> 
> 

Relating to the `Console.WriteLine(MonthNo1[j]);` at the bottom of the code.

can anyone see where I am going wrong with this?