“Not … Is Nothing” versus “… IsNot Nothing”

前端 未结 5 1756
夕颜
夕颜 2020-12-29 03:33

Does anyone here use VB.NET and have a strong preference for or against using Not foo Is Nothing as opposed to foo IsNot Nothing? If so, why?

5条回答
  •  Happy的楠姐
    2020-12-29 04:02

    I found a similar question here VB.NET - IsNothing versus Is Nothing, where I feel this question was exhaustively answered. Among the answers Jack Snipes identified http://weblogs.asp.net/psteele/410336, a blog that gives some extra detail. From those I prefer and have used

    IsNot Nothing
    

    which also makes my code easier to read and understand.

提交回复
热议问题