View Single Post
  #4 (permalink)  
Old 04-17-2009, 5:05 AM
cjard's Avatar
cjard cjard is offline
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 65
Posts: 6,442
Reputation: 807
cjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond repute
Default

Quote:
Originally Posted by LeonR View Post
1.) Read the text file into an array of somekind - or step through one line at a time.
2.) loop through each element and see if it contains your search string.
If it does contain the search string, then append that line onto another array
Bad idea; for a 1000 line file you might need up to 1 million comparisons, which is O^2, which is bad (slow)

Use a Dictionary
__________________
DW1 DW2 DW3 DW4 DNU PQ
Reply With Quote