我不太多使用选择案例,但认为它适用于此功能。如何对第二和第三种情况进行比较?编译器不喜欢该代码。在Select Case中是否无法以这种方式进行比较?
Private Shared Function TakeValue(ByVal interval As Integer) As Integer
Select Case interval
Case Is <= 15
Return 1440
***Case Is > 15 And <=30
Return 720
Case is > 30 And <=60
Return 528***
Case Else
Return 400
End Select
End Function
答案 0 :(得分:0)
也许是这样的:
Select Case interval
Case 0 To 15
Return 1440
Case 16 To 30
Return 720
Case 31 To 60
Return 528
Case Else
Return 400
End Select
参考文献: