Can someone explain me the behaviour of the following line in VB
Return Not (s Is Nothing)
I am looking to translate this in C# and i am not sure about those negation and do not understand the conditions.
Can someone explain me the behaviour of the following line in VB
Return Not (s Is Nothing)
I am looking to translate this in C# and i am not sure about those negation and do not understand the conditions.
In C# this would be
return s != null
A more direct transaltion is
return !(s == null)
but that would be odd looking in C# so the original translation is prefered.
Just FYI, in “idiomatic” VB, this would rather be written as:
Return s IsNot Nothing