Stopping the car aftert he finish line?

Hello, I’m using the car demo as a reference to create a racing game of my own. I figured out how to stop the car after the finish line by using the below javascript code
var carIsFinished : boolean = false;
function Start()
{
carIsFinished = false;
}
function Update()
{ var hit : WheelHit;

        if(myWC.GetGroundHit(hit)) { if(hit.collider.gameObject.tag == "finish") { carIsFinished = true; }}

       if(carIsFinished == false)
       { 
        GetInput();
       }



        
    }

COuld someone convert this into c# code?

The amazing thing is, that you script will pretty much work out of the box in C#, but since there were some things you could do to make it a bit more elegant, I thought I’d do that for you so you can compare what you had, how much extra work you were doing, and what it really needed. Enjoy.

void Update()
{
    WheelHit hit;
    if (myWC.GetGroundHit(hit) && hit.collider.gameObject.tag == "finish")
        enabled = false;

    GetInput();
}