I have the code below that requires me to convert a character array to string array, but I get the following error: Option Strict On disallows implicit conversions from '1-dimensional array of Char' to 'System.Collections.Generic.IEnumerable(Of String)'
Dim lst As New List(Of String)
lst.AddRange(IO.Path.GetInvalidPathChars())
lst.AddRange(IO.Path.GetInvalidFileNameChars())
lst.Add("&")
lst.Add("-")
lst.Add(" ")
Dim sbNewName As New StringBuilder(orignalName)
For i As Integer = 0 To lst.Count - 1
sbNewName.Replace(lst(i), "_")
Next
Return sbNewName.ToString
I tried using a converter through Array.ConvertAll, but couldn't find a good example, I could use a loop, but thought there would be a better way. Could anyone help?