Why this won't compile?

Hi Guys,

Could someone help me to understand why the code below won’t compile?

MonoDevelop gives me the following error: “A get or set accessor expected” where the “if” statement is.

    using UnityEngine;
    using System.Collections;
    
    public enum MenuStates {None, Localization, Menu, Tutorial, MainGame}
    
    public class MenuCanvasController : MonoBehaviour {

    	public MenuStates m_MenuState = MenuStates.None;
    
    	public MenuStates MenuState
    	{
    		get{ return m_MenuState; }
    		set{ m_MenuState = value; }
    	}
    
    	if (m_MenuState == MenuStates.None)
    		Debug.Log("FooBar");
    }

The code on lines 15 and 16 needs to be inside of a method - it can’t just float there in the class. Declare a Start method and put the code in there.

void Start()
{
    // your menu state code goes here
}