Java to C# Translation

Can someone please help translate this code for me?
I’m trying to make a space fighter simulator to where the ship will move at a constant speed that is adjustable with the scroll wheel. Thanks so much!
Here’s the code:

var defaultSpeed = 50.0; // speed to default towards if no keys are pressed
 var maxSpeed = 75.0; 
 var minSpeed = 25.0;
 var maxAcceleration = 5.0; // Controls the acceleration
 var currentSpeed = 50.0;
 
 // var Player = transform;  // this line gave me an error and it isn't needed any way
 
 function Update() 
 {
     transform.Translate(Vector3.forward * Time.deltaTime * currentSpeed);
 
     if(Input.GetKey("up"))
     currentSpeed += maxAcceleration * Time.deltaTime;
     else if(Input.GetKey("down"))
     currentSpeed-=maxAcceleration * Time.deltaTime;
     else if (currentSpeed > defaultSpeed){
         currentSpeed -= maxAcceleration * Time.deltaTime;
         currentSpeed = Mathf.Clamp(currentSpeed, defaultSpeed, maxSpeed);
     }
     else {
         currentSpeed += maxAcceleration * Time.deltaTime;
         currentSpeed = Mathf.Clamp(currentSpeed, minSpeed, defaultSpeed);
     }
     currentSpeed = Mathf.Clamp(currentSpeed, minSpeed, maxSpeed);
 }

You should try something like this CodeTranslator: Code Translation From VB.NET <-> C# <-> TypeScript <-> Java it can help you with the basic translation and of course you’ll have to look for possible errors, and change some details, but it may help