I have migrated a VB6 control to Vb.Net and when I had option strict on, I am getting "Option Strict On disallows late binding" error. Below I have mentioned VB6 code as well as migrated code in detail.
VB6 Code:-
Private m_colRows As Collection 'Represents the rows in a table
Private m_lngCurrCol As Long 'Control variable for Col Property
Private m_lngCurrRow As Long 'Control variable for Row Property
Public Property Let CellText(ByVal strText As String)
m_colRows(m_lngCurrRow)(m_lngCurrCol).Text = strText
End Property
Public Property Get CellText() As String
CellText = m_colRows(m_lngCurrRow)(m_lngCurrCol).Text
End Property
Below is the Migrated code(Vb.Net)
Public Property CellText() As String
Get
CellText = m_colRows.Item(m_lngCurrRow)(m_lngCurrCol).Text
End Get
Set(ByVal Value As String)
m_colRows.Item(m_lngCurrRow)(m_lngCurrCol).Text = Value
End Set
End Property
Option Strict On disallows late binding and I need help on modifying the code to work with it on.