I have this visual basic error and i was wondering if anyone could help.
Code:
I get the Error on this line:Code:Private Sub SearchToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchToolStripMenuItem.Click If My.Computer.FileSystem.DirectoryExists("… Then If My.Computer.FileSystem.FileExists("conta… Then If My.Computer.FileSystem.FileExists("conta… Then Dim a As New System.IO.StreamReader("contacts/list.da… Dim b As New System.IO.StreamReader("contacts/elist.d… Dim c As String = "HOLDER" Dim x As String = "HOLDER" Do While Not c = "" c = a.ReadLine x = b.ReadLine If Not c = "" Or x = "" Then Dim search As String = search_t.Text Dim l As Boolean = c.Contains(search) Dim m As Boolean = x.Contains(search) If l = True Or m = True Then Dim d As New ListViewItem d.Text = c d.SubItems.Add(x) ListView1.Items.Add(d) End If End If Loop a.Close() b.Close() End If End If End If End Sub
The error is:Code:Dim l As Boolean = c.Contains(search)
Object reference not set to an instance of an object.
PLEASE HELP! THANK YOU!




Reply With Quote
