Converting Melee Raycast from Java to C# Problems

I had a script written in Javascript for a melee attack system that I want to convert to C# but now I have these errors. Help!

Error CS1620: Argument ‘3’ must be passed with the ‘out’ keyword (CS1620) (Assembly-CSharp)

Error CS1502: The best overloaded method match for ‘UnityEngine.Physics.Raycast(UnityEngine.Vector3, UnityEngine.Vector3, out UnityEngine.RaycastHit)’ has some invalid arguments (CS1502) (Assembly-CSharp)

using UnityEngine;
using System.Collections;

public class MeleeSystem : MonoBehaviour {

	int Damage = 50;
	float Distance;
	float MaxDistance = 2;
	Transform TheSystem;
	
	void  Update (){
		if (Input.GetButtonDown("Fire1")) 
		{
			TheSystem.animation.Play("melee_attack");
			RaycastHit hit;
			if(Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), hit))
			{
				Distance = hit.distance;
				if (Distance < MaxDistance)
					hit.transform.SendMessage("ApplyDamage", Damage, SendMessageOptions.DontRequireReceiver); 
				
			}
			
		}
		
	}
	
}

The error message is telling you exactly what you need to do. You need to put the ‘out’ keyowrd before your ‘hit’ variable:

    if(Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), out hit))

Info on the ‘out’ keyword:

http://msdn.microsoft.com/en-us/library/ee332485.aspx