cannot be assigned to (it is read-only) Problem

I have been trying to change a non static class but when I try to do so I seem to get errors, even when I change the class to a static.

If anyone knows how to accomplish this task I would like to know.

This is the code that has been giving me the error:

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

public class SaveData : MonoBehaviour {

	public static SaveData ins;
	public bool LoadTiles;
	public bool MatchLists;
	public List<string> RoomName;


	public int LeftWall;
	public int RightWall;
	public int FrontWall;
	public int BackWall;

	// Use this for initialization
	void Awake () {
		ins = this;
	}

	public LocalGridNumber GridNumberDB;


	public GameObject SelectedRootObject;

	void Load (){
		LocalGridNumberEntry.LoadTiles ();
	}


	public string RoomDisplay; // to list individual rooms
	void Update(){

		LocalGridNumberEntry.Load1 = LoadTiles;


		if (LocalGridNumberEntry.Load1 == true) {
			LocalGridNumberEntry.LoadTiles ();
		}


		if (MatchLists == true) {
			LocalGridNumber.list.Count = RoomName.Count; // The error 

		}

		LocalGridNumberEntry.Room = RoomDisplay;

		LocalGridNumberEntry.RightWall = RightWall;
		LocalGridNumberEntry.LeftWall = LeftWall;
		LocalGridNumberEntry.FrontWall = FrontWall;
		LocalGridNumberEntry.BackWall = BackWall;

	}



}


	// Serialize


// 0 is Left
// 2 is Right
// 1 is Back
// 3 is Front


	[System.Serializable] // localgridnumber
	public class LocalGridNumberEntry{
		
	public static GameObject TileObject;
	public static bool Load1;

	public static string Room; // to list individual rooms

	public static int LeftWall;
	public static int RightWall;
	public static int FrontWall;
	public static int BackWall;

	public static void LoadTiles(){
		TileObject = GameObject.Find (Room);
		if (TileObject != null) {
			Debug.Log (Room);
			TileObject.GetComponent<GridLifeSupport> ().ActiveObjectSet = true;
			TileObject.GetComponent<GridLifeSupport> ().SelectPointVar0 = LeftWall;
			TileObject.GetComponent<GridLifeSupport> ().SelectPointVar1 = BackWall;
			TileObject.GetComponent<GridLifeSupport> ().SelectPointVar2 = RightWall;
			TileObject.GetComponent<GridLifeSupport> ().SelectPointVar3 = FrontWall;
		}
	}
		

}


		//////// Game Data
	[System.Serializable]
	public class LocalGridNumber{
	public static List<LocalGridNumberEntry> list = new List<LocalGridNumberEntry>();		
	}
		



//	[System.Serializable]
//	public class GameStateOverall{

	//////// Game Settings

//	public bool GameState; // BuildMode true or false?



//	}

Is LocalGridNumber.list a 1 or similar object?

If so, you can’t change the Count field of that object. The Count field is read-only because it tells you how many things are in that list. It cannot be set directly, though it will automatically change when you add or remove something from that list.

Given you have another List<LocalGridNumberEntry>somewhere,

	// for each index in other list,
	for (int i = 0; i < otherList.Count; ++i)
	{
		if (i < LocalGridNumber.list.Count) {
			// replace old value in list.
			LocalGridNumber.list _= otherList*;*_

* } else {*
* // add new value to list.*
_ LocalGridNumber.list.Add(otherList*);
}
}
// remove elements that are not in the old list.
LocalGridNumber.list.RemoveRange(otherList.Count, LocalGridNumber.list.Count);*
Note that since LocalGridNumberEntry is a class, this code changes the list by only adding a reference to the old LocalGridNumberEntry instance, without copying every field across to a new instance.
You may want to change the code a bit. I think your LocalGridNumberEntry fields should not all be marked static, because that means each new LocalGridNumberEntry instance does not have different values._