D
dbuchanan
Why can't I add the 'Overridable' key word to any of the methods
or events in my base class? VB.NET thinks I am trying to define a
variable. What am I doing wrong?
I get the squiggly line under most of the method and the error reads
"Option Strict On requires all vaiable declarations to have an
'AS' clause"
Example code 1:
Protected Overrideable Sub SaveRecord()
' stuff to save a record
End Sub
Example code 2:
Protected Overrideable Sub DataGrid1_MouseUp(ByVal sender As
Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles
DataGrid1.MouseUp
'Highlight the entire row
'Get the X and Y of the DataGrid from the mouse event
Dim pt As New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = Me.DataGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
'Me.DataGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column)
Me.DataGrid1.Select(hti.Row)
End If
End Sub
Please help.
-Doug
or events in my base class? VB.NET thinks I am trying to define a
variable. What am I doing wrong?
I get the squiggly line under most of the method and the error reads
"Option Strict On requires all vaiable declarations to have an
'AS' clause"
Example code 1:
Protected Overrideable Sub SaveRecord()
' stuff to save a record
End Sub
Example code 2:
Protected Overrideable Sub DataGrid1_MouseUp(ByVal sender As
Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles
DataGrid1.MouseUp
'Highlight the entire row
'Get the X and Y of the DataGrid from the mouse event
Dim pt As New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = Me.DataGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
'Me.DataGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column)
Me.DataGrid1.Select(hti.Row)
End If
End Sub
Please help.
-Doug