I have this user input:
first line: 1 2 second line: 0 1 1 third line: 1 0 0
with the code below I have managed to read all lines and store them into a list, in the last bit of code what I want to do is to store the values like integer types Int32, can anyone tell me of a better way to do this operation?
List<string> lines = new List<string>();
string line;
int count = -2;
int totCount = 0;
while (count<=totCount)
{
line = Console.ReadLine();
lines.Add(line);
count++;
}
var line1 = lines[0];
var line2 = lines[1];
var line3 = lines[2];
string[] ee = line1.Split(new char[] { ' ' }, StringSplitOptions.None);
int c = Int32.Parse(ee[1]);
...