Using default generated StateMachineBehaviour script has errors

In an animation controller, on an animation state, I used the “Add Behavior” button to generate a C# script. The script came pre-loaded with some using statements and commented out overrides. I uncommented one override and the Unity compiler is throwing errors saying

Assets/rotate_180.cs(8,43): error CS0246: The type or namespace name animator' could not be found. Are you missing a using directive or an assembly reference? Assets/rotate_180.cs(8,62): error CS0246: The type or namespace name animatorstateinfo’ could not be found. Are you missing a using directive or an assembly reference?

I do have the previous version of unity installed (if that might have anything to do with it)
but right now I am using Unity 5 in 2D.

What is wrong?

I have the same problem if anyone has a solution. I’ll post mine if I find one.

EDIT: I found the solution. Ensure that the type names as well as the function are in camelcase. Looks like VS studio’s uncomment hotkey put everything in lowercase?