I've been trying to make a matrix console application in C# but I am struggling when it comes to checking viability of user input. Here's the code:

```
//INPUT OF VALUES INTO MATRIX A BY ROWS
int ValuesCounter = 2; //index for new arrays created on fail.
string[] valuesValuesCounter = Console.ReadLine().Split(' '); //read user input into string array
int[] valuescheckValuesCounter = new int[valuesValuesCounter.Length]; //test array to check if user input can be parsed into int
for (int i = 0; i <= valuesValuesCounter.Length; i++) // loop for checking parseability of individual array items
{
    while(!int.TryParse(valuesValuesCounter[i], out valuescheckValuesCounter[i])) //same
    {
        /*if it can't be parsed, create new array and try again*/
        ValuesCounter += 2;
        Console.WriteLine("Wrong values! Please try again!");
        valuesValuesCounter = Console.ReadLine().Split(' ');
        valuescheckValuesCounter = new int[valuesValuesCounter.Length];
    }
}

```

I doubt this is very efficient. I've tried using ArrayList instead because you can just remove the values in it, but it can't be split so I don't know how to make it work. What is a better way to do this?  

Also tried conducting my own research, but didn't find any solution (maybe it's there and I am just stupid for not seeing it, I don't know).

[How to delete an array in c#?](https://stackoverflow.com/questions/584017/how-to-delete-an-array-in-c)  

[Convert 2D string array into 2D int array (Multidimensional Arrays)](https://stackoverflow.com/questions/40708656/convert-2d-string-array-into-2d-int-array-multidimensional-arrays)  

[C# arraylist user input](https://stackoverflow.com/questions/7633152/c-sharp-arraylist-user-input)  

[int.TryParse out into an object array](https://stackoverflow.com/questions/18700333/int-tryparse-out-into-an-object-array) (this seems pretty close but I don't see anything there to retry the input in case it can't be parsed).

So there you have it. I'm pretty dumb so if this question seems stupid it's because the one asking it is stupid.