im new in vb.net
i want to delete an item on a listview,
this is my code

     If ListView1.SelectedItems.Count > 0 AndAlso MessageBox.Show("Do you want to delete this item?", "Confirm", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then 'make sure there is a selected item to delete
        End If

now my problem is i want to delete that item on the text file line

( using streamreader and streamwriter)
can someone help??

Wich is the structure of the text file?
Are you selecting by index (in the same order that the original text) or the values in the listview are sorted in a distinct way?

Are the items in the listview having subitems? In this case, are relevat to the text file contents?

Did you need to delete the content of the text file or you can create a new temp file from remaining content in the listview, and then rename the old to .old then rename new to the right name??

Please, let us know.