A VB project I've inherited contains this
Code:
Dim [clean_string] As String = Regex.Replace(scanCode, "[^0-9a-zA-Z\> ]+?", "")
I want to replicate this in a new form in the same project but it's giving this error.
Error : Overload resolution failed because no accessible 'Replace' can be called without a narrowing conversion:
'Public Function Replace(input As String, replacement As String, count As Integer) As String': Argument matching parameter 'input' narrows from 'Integer' to 'String'.
'Public Function Replace(input As String, replacement As String, count As Integer) As String': Argument matching parameter 'count' narrows from 'String' to 'Integer'.
What's likely to be missing? I've copied over this line at the start of the code but to no avail.
Imports System.Text.RegularExpressions