When compiling, with Option Strict on, I get a Late Binding Error on the following code. I have looked for an answer and tried several options to try and fix it, with no success.
Code works with Option Strict off. How do I fix this?
VB.NET:
Dim strParam1 As String()
Dim arrayParameters As ArrayList = Nothing
Dim strParameterText As String = ""
strParameterText = DGVScadaEquipmentGeneration.Rows(r).Cells("Param").Value.ToString
Dim strSeparators() As Char = {";"c}
strWords = strParameterText.Split(strSeparators)
Dim Names As String() = strParameterText.Split(strSeparators)
For Each n As String In Names
arrayParameters.Add(n)
Next
'Get Parameters
strSeparators = {"="c, ","c}
[HIGHLIGHT]strParam1 = arrayParameters(0).Split(strSeparators)[/HIGHLIGHT] <-- Late Binding error
lblParameter1.Text = strParam1(0) & "="
For Each n As String In strParam1
If n <> "plc" Then
lboxParameter1.Items.Add(n)
End If
Next
Code works with Option Strict off. How do I fix this?