Public Function checkForChars(ByVal arrayOfChars As String(), ByVal stringToCheck As String) As Boolean
Dim i As Integer
Dim numEntries As Integer = arrayOfChars.Length - 1
For i = 0 To numEntries
If (stringToCheck.Contains(arrayOfChars(numEntries)) = True) Then
Return True
End If
Next
Return False
End Function
嘿,我正在使用上面的函数来检查字符串中的字符数组,但是如果字符串太长,则会出现算术溢出错误(表明我已经除以 0)。目前我实际上使用的是整数 value.toString,有人可以对此有所了解吗?
谢谢