我有这个代码: For each c as char in "Hello World" Select Case c Case "h" DoSomething() Case "e" DoSomething() End SelectNext 为什么我不能这样写: Case "h" Or "e" DoSomething() 它说’Long’值无法转换为’Char’ 如
For each c as char in "Hello World" Select Case c Case "h" DoSomething() Case "e" DoSomething() End Select Next
为什么我不能这样写:
Case "h" Or "e" DoSomething()
它说’Long’值无法转换为’Char’
如何完成这项任务?
使用:Select Case c Case "h" Case "e" DoSomething() End Select
要么:
Select Case c Case "h","e" DoSomething() End Select