Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

vb.net delete a line from text file

Dim delLine As Integer = 10
Dim lines As List(Of String) = System.IO.File.ReadAllLines("infile.txt").ToList
lines.RemoveAt(delLine - 1) ' index starts at 0 
System.IO.File.WriteAllLines("outfile.txt", lines)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #line #text #file
ADD COMMENT
Topic
Name
4+8 =