Raycasting Issues in C#

Currently attempting to convert a JS script into a C#, not sure where I’m going wrong but I’m getting a parsing error?

Here is my code, is there something I missed while converting? I have been trying to use the Unity Script Reference to convert it.

using UnityEngine;
using System.Collections;

public class Hammer_Melee : MonoBehaviour {

        public int TheDamage = 25;
	public float Distance;
	public float MaxDistance = 2.0;
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		if(Input.GetButtonDown("Fire1")) 
		{
			public RaycastHit hit;
			if(Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), hit))
			{
				Distance = hit.distance;
			if(Distance < MaxDistance)
				{
					hit.transform.SendMessage("Apply Damage"), TheDamage, SendMessageOptions.DontRequireReceiver));
				}
			}
		}
	}
}

Put keyword ‘out’ before hit on line 20 (a C# oddity)
But a parsing error is often a mismatch in { } , so if ‘out’ doesn’t fix it check all your grammatical marks