部分程序,判断输入的月份是哪一个季度
Select Case month
Case "3"
Case "4"
Case "5"
outcome = month & "月是春季。"
Case "6"
Case "7"
Case "8"
outcome = month + "月是夏季。"
Case "9"
Case "10"
Case "11"
outcome = month + "月是秋季。"
Case "12"
Case "1"
Case "2"
outcome = month + "月是冬季。"
Case Else
outcome = "居然有" + month + "月?你歷害!"
End Select
End Sub
只有在month变量等于5、8、11、2时才会有输出
我不想在没一个case后都写同样的语句,有什么办法吗?
Select Case month
Case "3"
Case "4"
Case "5"
outcome = month & "月是春季。"
Case "6"
Case "7"
Case "8"
outcome = month + "月是夏季。"
Case "9"
Case "10"
Case "11"
outcome = month + "月是秋季。"
Case "12"
Case "1"
Case "2"
outcome = month + "月是冬季。"
Case Else
outcome = "居然有" + month + "月?你歷害!"
End Select
End Sub
只有在month变量等于5、8、11、2时才会有输出
我不想在没一个case后都写同样的语句,有什么办法吗?
解决方案 »
- Repeater分页
- vs2005发布网站时的问题
- 自定义控件 未能加载类型“XXX”,求助,在线等
- 找不到VSTS里创建的web test项目中需要的dll
- 问一个小问题,做系统做的比较多的帮帮忙?谢谢
- asp.net小问题!!!!!!!!!!!!!!!!
- 请高手帮忙,插入值的时候出的问题
- DataGrid前端页面如何调用后台的函数?
- 问一个关于imagebutton和梅花雨控件的问题。兄弟姐妹进来看看了。
- 怎么在virtual studio.net环境下联合开发一个.net web project?
- 使用Visual studio 作美工
- 关于web.config,location可以不写path属性吗?
方法2:用一个存储过程返回结果,哪里用直接调用这个存储过程就可以了。