Can you help me convert this to C#?

var target : Transform; //the enemy's target var moveSpeed = 3; //move speed var rotationSpeed = 3; //speed of turning

var myTransform : Transform; //current transform data of this enemy

function Awake() { myTransform = transform; //cache transform data for easy access/preformance }

function Start() { target = GameObject.FindWithTag("Player").transform; //target the player

}

function Update () { //rotate to look at the player myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);

//move towards the player
myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

}

Not really sure why you would be coding in c# if you don't know how to write it, but here it is converted anyway. Rename the class.

    [System.Serializable]
    public class Move : MonoBehaviour
    {
        public Transform Target;
        public float MoveSpeed = 3f;
        public float RotationSpeed = 3f;

        private Transform _myTransform;

        void Awake()
        {
            _myTransform = transform;
        }

        void Start()
        {
            Target = GameObject.FindWithTag("Player").transform;
        }

        void Update()
        {
            _myTransform.rotation = Quaternion.Slerp(_myTransform.rotation, Quaternion.LookRotation(Target.position - _myTransform.position), RotationSpeed * Time.deltaTime);
            _myTransform.position += _myTransform.forward*MoveSpeed*Time.deltaTime;
        }
    }