Reputation: 45
Have next lines:
var line1 = File.ReadLines(@"input_5_5.txt").Take(1).ToArray();
string[] u = line1.Split(new Char[] { ' ' });
int[,] result = new int[u[0], u[1]];
Need to split and take characters from line1 to initialize size of array but it runs error about word "Split".
Upvotes: 0
Views: 63
Reputation: 12459
line1
is an array.
You need to cast it to string:
(line1[0] as String).Split(...
or simply
line1[0].Split(...
Upvotes: 3