I am reading the following code in vb6
If someInteger Then
DoSomething
End If
I don't know if it means
someInteger == 1,someInteger > -1,someInteger > 0 orConvert.ToBoolean(someInteger)What's the equivalent expression in C#?
In VB6 any non-zero value is considered True; zero is false. I would advice to always specify the expression as it was (and it should be) boolean:
If someInteger <> 0 Then ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With