How to rewrite this line of javascript in c#?

Hey, sorry for this post but i didn´t find a way to rewrite it.

If i paste this line

if (Input.GetAxis("Mouse ScrollWheel")){...}

from javascript in a .cs-file, i get this error:

What´s the correct code for that and
where can i find information about the difference between unity javascript and c#?

Thanks for your time

The clue is in the error message. It is complaining that it expects a type “bool” value but it’s got a type “float” value and tt won’t change the type without explicit instructions to do so.

Input.GetAxis() doesn’t return a bool value, it has a return type of float. Try feeding the output of Input.GetAxis() into a comparison operator such as ==0 or <0.1.

if (Input.GetAxis("Mouse ScrollWheel") != 0){
      // Do something.
}