How to call invoke from a sub class

I have a script attached to my Player object, and within the player script there is a nested class called PowerContainer. Within this nested class there is a method which needs to set a value to true, wait for a specified amount of time, then set the falue back to false.

The trouble is, when I try and run the game with this code in place, I get the following error:

CS0038: Cannot acces a nonstatic memeber of outer type PlayerController via nested type PlayerController.PowerContainer.

But the method I’m trying to Invoke is a member of PlayerController.PowerContainer, not PlayerController

public class PlayerController : MonoBehaviour 
{

private class PowerContainer 
	{
		protected bool MULTI_SHOT = false;


		public void giveMultiShot(float _amountOfSeconds)
		{
			this.MULTI_SHOT = true;
			Invoke("removeMultiShot", _amountOfSeconds);
		}

		private void removeMultiShot()
		{
			MULTI_SHOT = false;
		}


		public bool hasMultiShot()
		{
			return this.MULTI_SHOT;
		}
	}

}

So finally I figured out what needs to be done…

A reference to the PlayerController object needs to be passed to the function in order to be able to use Invoke:

private class PowerContainer
{
  protected bool MULTI_SHOT = false;
 
 
  public void giveMultiShot(PlayerController _c, float _amountOfSeconds)
  {
     this.MULTI_SHOT = true;
     _c.Invoke("removeMultiShot", _amountOfSeconds);
  }
}

then it can be called from PlayerController like this:

[object].giveMultiShot(this, 30);