G
GS
why am i getting
A first chance exception of type 'System.NullReferenceException' occurred in
myapp.exe
below? and what can i do get rid of it?
Private Function getPrefxType() As String
If bSkipGetListBOxComboBoxValue Then Return ""
Try
getPrefxType = DropListPreFxType.SelectedValue.ToString '
<<error
' the above line gives
'A first chance exception of type
'System.NullReferenceException' occurred in myapp.exe
Me.setStatus("OK")
Catch ex As Exception
If DropListPreFxType.SelectedIndex < 0 Then
DropListPreFxType.SelectedIndex = 0
'MsgBox("PrefxType ComboBox index=" &
DropListPreFxType.SelectedIndex.ToString & vbCrLf & "Text=" &
DropListPreFxType.Text & vbCrLf, MsgBoxStyle.Information, Me.Text & " -
@debug getPrefxType")
End If
getPrefxType = DropListPreFxType.Text.ToString()
End Try
getPrefxType = "Act" & getPrefxType
End Function
A first chance exception of type 'System.NullReferenceException' occurred in
myapp.exe
below? and what can i do get rid of it?
Private Function getPrefxType() As String
If bSkipGetListBOxComboBoxValue Then Return ""
Try
getPrefxType = DropListPreFxType.SelectedValue.ToString '
<<error
' the above line gives
'A first chance exception of type
'System.NullReferenceException' occurred in myapp.exe
Me.setStatus("OK")
Catch ex As Exception
If DropListPreFxType.SelectedIndex < 0 Then
DropListPreFxType.SelectedIndex = 0
'MsgBox("PrefxType ComboBox index=" &
DropListPreFxType.SelectedIndex.ToString & vbCrLf & "Text=" &
DropListPreFxType.Text & vbCrLf, MsgBoxStyle.Information, Me.Text & " -
@debug getPrefxType")
End If
getPrefxType = DropListPreFxType.Text.ToString()
End Try
getPrefxType = "Act" & getPrefxType
End Function