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
Hey, I'm using the above function to check a string for an array of characters, but if the string is too long it gives an arithmetic overflow error (suggesting that I've divided by 0). At the moment I'm actually using an integer value.toString, can someone shed some light on this?
Thanks