Re: Remove Lines in a text file
- From: "Lebesgue" <nospam@xxxxxxx>
- Date: Tue, 3 May 2005 22:36:42 +0200
string[] lines = myString.Split(Environment.NewLine)
now you have the lines, just choose and join the ones you want
Maybe there is a more optimal solution for this, but this should work fine.
"a" <a@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EFC48785-33AF-4C30-8860-F89B4126080F@xxxxxxxxxxxxxxxx
> I'm trying to remove specific lines from text files.
>
> I need to always remove lines 1 thru 8 and lines 10 and 11 from text
files.
>
> Seems like a simple task, but I'm not getting it.
>
> I'm reading the file via webresponse as a stream and then trying to remove
> the lines before parsing it and then writing it to an sql table.
>
> Any ideas on how I can accomplish the line removal/deletion?
>
> Thanks,
>
> Paul
.
- References:
- Remove Lines in a text file
- From: a
- Remove Lines in a text file
- Prev by Date: Forms Authoring
- Next by Date: get Control by Name
- Previous by thread: Remove Lines in a text file
- Next by thread: Forms Authoring
- Index(es):
Relevant Pages
|