bool parameter in Animator

trying to get a game object to expand through a user input- I have the animation in the Animator controller, and I have a bool named “expand” as a parameter. I want to access it through a UI button click, (for the sake of getting it to work I am experimenting using spacebar instead) and I am not clear on how to get it to set the bool to true in script (C#)

I am here in my effort

using UnityEngine;
using System.Collections;

public class expandDV : MonoBehaviour
Animator anim;

void Start ()
			anim = GetComponent<Animator> ();

void Update ()
			//AnimatorStateInfo stateInfo = anim.GetCurrentAnimatorStateInfo (0);
			if (Input.GetKeyDown (KeyCode.Space)) 
					anim.SetBool (expand = true);


apologies for my noob-ness


I think you want to use:

anim.SetBool("expand", true);