I am quite new to c#, and still don't understand some basics about arrays. When I initialize my program, I ask the user for an input, in integer form, and then I use that to declare the size of the array. Implementation:
int sortSpaceSize = Console.Read ();
bool[] sortSpace = new bool[sortSpaceSize];
However, when I test the program, the array size is just...wierd. When I type 45 as an input, it outputs an array size of 52. With 964684, it outputs 57. I have no idea on what is wrong. If you are not allowed to use variables as sizes when declaring arrays, then why does this not throw an error? Should I use a list instead? Thank you in advance.