IsNothing versus Is Nothing

后端 未结 9 1514
暗喜
暗喜 2020-11-29 23:51

Does anyone here use VB.NET and have a strong preference for or against using IsNothing as opposed to Is Nothing (for example, If IsNothing(a

9条回答
  •  萌比男神i
    2020-11-30 00:01

    VB is full of things like that trying to make it both "like english" and comfortable for people who are used to languages that use () and {} a lot. For example, on the "like english"side...VB has the "Ain't" keyword...and no, I'm not joking. And on the other side, as you already probably know most of the time you can use () with function calls if you want to, but don't have to.

    I prefer IsNothing()...but I use C and C#, so that's just what is comfortable. And I think it's more readable. But go with whatever feels more comfortable to you.

提交回复
热议问题