VB.net基础:不要写这样的句子(更新中)

类别:.NET开发 点击:0 评论:0 推荐:

——————————————————————————————

不应该写
Private
Function A(ByVal B As Integer) As Boolean

    If B > 0 Then

        Return True

    Else

        Return False

    End If

End Function


而应该写

Private
Function A(ByVal B As Integer) As Boolean

    Return (B > 0)

End Function
——————————————————————————————

本文地址:http://com.8s8s.com/it/it43775.htm