Raycast variable type in C#?

So i am trying to translate all my JS scripts to C# by using a converter and I understand that I will need to change a few errors that come up. In this most recent script, I am unsure of naming one of the variables I used in JS called “hit” Here is the code. I am having trouble because I don’t think its supposed to be RaycastHit.

JS function with hit. This is the only time hit is used

function Update()
{
	var hit : RaycastHit;
	var fwd = transform.TransformDirection(Vector3.forward);
	
	if(Physics.Raycast(transform.position, fwd, hit, rayLength))
	{

C# attempt. I assume RaycastHit is not a variable type or I named it incorrectly.

void  Update (){
		RaycastHit hit;
		fwd = transform.TransformDirection(Vector3.forward);

		if(Physics.Raycast(transform.position, fwd, hit, rayLength))
		{

You are missing a RaycastHit variable:) And i allweys add debug.drawray to see how it actually behaves - helps alot )
Try this as an example:

    Ray rayOrigin = Camera.main.ScreenPointToRay(Input.mousePosition); //Ray from camera to mouseclick position
                RaycastHit hitInfo; // info of object hit by ray (THIS IS YOUR VARIABLE!)
    
                if(Physics.Raycast(rayOrigin,out hitInfo, distance,9))
                {
                    Debug.DrawLine(rayOrigin.direction, hitInfo.point,Color.red);
                 }