Converting StreamWriter to StreamReader

public static int [,] gridLocation = new int [10,10,10,10,27,7];

I have saved an multi array show on top using the following code.

var path = Application.dataPath + "Save";
if (!Directory.Exists (path)) Directory.CreateDirectory(path);
using(StreamWriter sw = new StreamWriter(path + "/Beyond.txt")) foreach(var item in gridLocation) sw.WriteLine(item);

How do I reverse the process?

I tried this, is there an easier way? This one did not work, cannot convert string to integer. I don’t even know if this code will work at all, was unable to test it. Is this the correct way? It would not let me convert to array nor integer.

var path = Application.dataPath + "Save";
if (!Directory.Exists (path)) Directory.CreateDirectory(path);
using(StreamReader sr = new StreamReader(path + "/BeyondTemp.txt"))
			for (g = 0; g <=9; g++){ // Galaxy (g)
				for (s = 0; s <=9; s++){ // Star (s)
					for (p = 0; p <=9; p++){ // Planet (p)
						for (m = 0; m <=9; m++){ // Satellite (m)
							for (b = 0; b <=26; b++){ // GridBox (b)
								for (a = 0; a <=6; a++){ // Area (a)
									gridLocation[g,s,p,m,b,a] = sr.ReadLine();  // cannot convert string to int

You can convert a string to int by using int.Parse()

string s = "123";
int i = int.Parse(s);