0
我想檢查中的每個字符串索引頁 string witf If。這是indexpage多個字符串在一個字符串中或者
Dim indexpage As String = "string1" Or "string2"
我tryed括號,OrElse運算,但它並沒有奏效。而這不是一個關於如果函數問題。它仍然給我,當我嘗試沒有如果函數這個錯誤...
的錯誤:
An unhandled exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
Additional information: Conversion from string "string1" to type 'Boolean' is not valid.
什麼你所期望的'indexpage'這樣的轉讓後,包含哪些內容? –
還是你說你想檢查'indexpage'是否已經等於這些字符串中的任何一個? –
@JamesThorpe是的。 – Eren