How can I access Animator parameters in C#

I’m fairly new at C# in Unity and I’ll like to access a parameter in my player Animator controller in my C# script. I want to make an IF statement saying: if my animator float parameter is greater then 0.5 then say something in the console.
But I don’t know how to write this in C#. Can someone please help me out?

Animator myAnimator;

//using variable name
myAnimator.GetFloat("[variable name here]");
//using variable index
myAnimator.GetFloat(0);

Thx I figured it out. I just wrote:
if(anim.GetFloat (“speedPercent”) > 0.5){
Debug.Log(“running”);
}

anim is a variable for my Animator. I’m pretty sure that I’v already tried this code before so I dont know why its working now. Thx again for the replies.