I want to be able to insert an array
of integer
as standard input which can has a length of 1000000.
I am trying to do that using this code but the array
will be only a size of 254, (I read from an article that Console.ReadLine take only 254 charecter).
Note: Every character of the array
is between 1 to 6
and the first line of the code numThrows
represents the length
of the array.
int numThrows = Convert.ToInt32(Console.ReadLine()); // length of array
string str = Console.ReadLine();
int[] arr = new int[numThrows];
arr = str.Select(c => Convert.ToInt32(c.ToString())).ToArray();