兄弟们啊,帮忙修改一个array吧。
Dim cdString As String = "01,02,03,04,05 "
Dim kbnCd As String = "05 "
Dim cdArray As Array = cdString.Split( ", ")
For i As Integer = 0 To cdArray.Length - 1
If cdArray(i) = kbnCd Then
Response.Write( "有 ")
Exit For
ElseIf i = cdArray.Length - 1 Then
Response.Write( "无 ")
End If
Next
我以前是做asp的,我这写法是不是太asp了,该怎么弄一下才好?十分感谢!
------解决方案--------------------Dim cdString As String = "01,02,03,04,05 "
Dim kbnCd As String = "05 "
If cdString.Contains(kbnCd) Then
Response.Write( "有 ")
Else
Response.Write( "无 ")
End If