How to play reverse animation?

Hi I want to play reverse animation. ie Move a cube from point A to B and then back from B to A
I have tried using links

http://forum.unity3d.com/threads/playing-animation-backwards.15071/

but every time it throws error

Script using is

using UnityEngine;
using System.Collections;

public class test : MonoBehaviour {
	public GameObject cube;

	Animator animator;
	// Use this for initialization
	void Start () {
		animator = cube.GetComponent<Animator>();
	}
	
	// Update is called once per frame
	void Update () {
		if(Input.GetKey(KeyCode.RightArrow)) {
			animator.SetTrigger("move");
		}if(Input.GetKey(KeyCode.LeftArrow)) {
			animator.animation["@anim"].speed = -1;
			animator.SetTrigger("move");
		}
	}
}

Thanks…

Did you even read the question ? before closing it you fool…?
I know what is null pointer exception is…@SaraCecilia

Try reversing the speed of the animator.