Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int[,] ReadMatrix(string path)
- {
- try
- {
- string[] mass = File.ReadAllLines(path);
- //string[,] arr = new string[mass.Length, mass[0].Split(' ').Length];
- int[,] fd = new int[mass.Length, mass[0].Split(' ').Length];
- for (int i = 0; i < mass.Length; i++)
- {
- string[] buf = mass[i].Split(' ');
- for (int j = 0; j < buf.Length; j++)
- {
- fd[i, j] = Convert.ToInt32(buf[j]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement