I am learning VB Net 2019. My program searches (with NI-VISA) for all available instrument types as selected by user. Based on checkboxes selected I build a resourceString in a NI-VISA format where the abbreviations that NI-VISA expects are ASRL, GPIB, TCPIP, USB. The resourceString expects these types to be separated by the ' | ' character and I need to strip off the last ' | ' and then terminate with a string of "?*"
I have Option Strict On as I was told to learn VB NET this way
Dim resourceString as String = "ASRL|GPIB|TCPIP|USB|" 'for debugging i use a string with all resources as they would be added
Dim charsToTrim() As Char = {"|"}
Dim temp As String = resourceString.TrimEnd(charsToTrim)
resourceString = temp + "?*"
I get an error : on the 3rd line with the ' | ' : Error BC30512 Option Strict On disallows implicit conversions from 'String' to 'Char'.
Is my only option to turn off Option Strict?