CS0103 Error

Having an issue with creating a State Machine.
In my states, the variable, ‘manager’ doesn’t exist in the current context.
I’m not sure why it isn’t grabbing it from the BeginState.

StateManager:

using UnityEngine;
using Assets.Code.States;
using Assets.Code.Interfaces;

public class StateManager : MonoBehaviour {

	private IStateBase activeState;

	void Start () {
		activeState = new BeginState (this);
	}

	void Update () {
		if (activeState != null)
		activeState.StateUpdate ();
	}
	public void SwitchState(IStateBase newState) {
				activeState = newState;
		}
}

IStateBase:

namespace Assets.Code.Interfaces
{
		public interface IStateBase
		{
		void StateUpdate();
		void ShowIt();
		}
}

BeginState:

using UnityEngine;
    using Assets.Code.Interfaces;
    
    namespace Assets.Code.States {
    
    	public class BeginState : IStateBase {
    		private StateManager manager;
    
    		public BeginState (StateManager managerRef)
    		{
    			manager = managerRef;
    			Debug.Log("Constructing BeginState");
    		}
    		public void StateUpdate() {
    			if (Input.GetKeyUp(KeyCode.Space)) {
    				manager.SwitchState (new PlayState (manager));
    			}
    		}
    		public void ShowIt() {
    		}
    	}
    }

PlayState:
using UnityEngine;
using Assets.Code.Interfaces;

namespace Assets.Code.States
{
		public class PlayState : IStateBase
		{
				public PlayState (StateManager managerRef)
				{
					Debug.Log("Constructing PlayState");
				}
				public void StateUpdate() {
					if (Input.GetKeyUp(KeyCode.Space)) {
						manager.SwitchState (new WonState (manager));
					}
				}
				public void ShowIt() {
				}
		}
}

public class PlayState : IStateBase
{
StateManager manager;
public PlayState (StateManager managerRef)
{
manager = managerRef;
Debug.Log(“Constructing PlayState”);
}
}

You have to store a reference to manager in your PlayState class. So far you just passed it to the constructor.

PlayState can’t access fields from BeginState. You probably forgot these two lines in PlayState:

    namespace Assets.Code.States
    {
    	public class PlayState : IStateBase
    	{
    		private StateManager manager; // <--
    		
    		public PlayState (StateManager managerRef)
    		{
    			manager = managerRef; // <--
    			Debug.Log("Constructing PlayState");
    		}
    		
    		public void StateUpdate() {
    			if (Input.GetKeyUp(KeyCode.Space)) {
    				manager.SwitchState (new WonState (manager));
    			}
    		}
    		
    		public void ShowIt() {
    		}
    	}
    }