C# reading from a .txt file problem

hello!

in my project im trying to read some text of my .txt file, as of now the file reader isn’t exactly developed as the pretty much first thing i tried to do has given me an problem, as for why this is happening im clueless.

this is my script

using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Collections.Generic;


public class MapReader: MonoBehaviour	
{
	public string MapName = "test.map";

	public string LoadingStatus = "Done";


	public string[] gameobjectarray1;
	public string[] gameobjectarray2;
	public string[] gameobjectarraytemp;


	// Used for further scripts !
	public GameObject[] InstanceID;


	public int i3 = 0;

	void Start ()	
	{
		string MapInfo = "Maps/" + MapName;
		string MapInfoData= System.IO.File.ReadAllText (MapInfo);
		
		gameobjectarray1 = MapInfoData.Split ("\n" [0]);


		for(int i = 0 ; i < gameobjectarray1.Length ; i++ )
		{
			gameobjectarraytemp = gameobjectarray1[i].Split(","[0]);

			for(int i2 = 0 ; i2 < gameobjectarraytemp.Length ; i2++)
			{
			
				gameobjectarray2[i3] = gameobjectarraytemp[i2];
				i3++;
			}
		}
		for(int i = 0 ; i < gameobjectarray2.Length ; i++ )
		{


			if (LoadingStatus == "Done"  gameobjectarray2[i] == "MapSize")
			{
				LoadingStatus = gameobjectarray2[i];
				Debug.Log("Loading status was changed to" + LoadingStatus);
			}
			else
			{
				Debug.LogError(gameobjectarray2[i]);
			}
		}
	}
}

it basiclly loads the whole text file, seperates the whole scipt into rows, and if in that row there are any commas it seperates them into seperate words, this process works ok, the troubelsome part is when i try to read from the array that has been created in the process.here is a picture for proof that the array has actually all the data stored in him.

now as you can see i have a variable called “LoadingStatus” , which basiclly tracks the process of reading the file, and should change whenever the word “MapSize” is encountered and even tho this is one word that is stored in the array (position 0) even tho it is exactly equal to the word it should match in the if statement it doesn’t go trough and throws in an debug log error you can see in the down left corner of the picture it is equal … why is this happening?

As far as my memory of upper and lower case letters goes, I think that “MAPSIZE” does not equal “MapSize”. Maybe use String.Compare.