TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > VB.NET

Notices

Remove/Delete lines from an array

VB.NET


Reply
 
Thread Tools Display Modes
Old 14-12-2007, 09:51 PM   #1
Barkingmadscot
Guest
 
Posts: n/a
Remove/Delete lines from an array

I am stuck, i cant work out how to remove lines from an array

I am loading a text file (a Log) into an array, I know which lines a
need, but the logs can be upto 30K sometimes bigger. I found trying
to delete the lines from the log file before loading in the array took
ages, i thought it would be alot quicker to put it in an array and
remove the unwanted lines. Also the files it stored on a network drive
so i think the array option is better.

Dim text As Array
Dim lines As New List(Of String)
text = File.ReadAllLines(strLogDestPath & fileNm)
lines.AddRange(text)


lines.RemoveAt(1) - I thought this should have removed the
array index 1


When i took at the before and after this line nothing has changed??


Any help would be great

ta
  Reply With Quote
Old 22-02-2008, 03:34 PM   #2
Newbie
 
Join Date: Feb 2008
Age: 37
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 Paul Haerkens is an unknown quantity at this point
Re: Remove/Delete lines from an array

Hi Barkingmadscot,

I Have the same problem, do you get a solutions in the meantime.

Kind regards Paul
Paul Haerkens is offline   Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 03:06 AM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional