|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Checking occurances in a txt/ini fileIn VB.Net is there a simple quick way to check how many
occurances of a phrase (ie "xxx") there is in a txt or ini file or must we do it the long fashioned way of reading through the entire file one line at a time? Thanks, Adam You don't have the read the entire file one line at a time, but you
could read it in one go, using the ReadToEnd() method. Then you could call the IndexOf method in a loop, and increment the start position of this method with each iteration. Is that too Long-fashioned ? Regards, Cerebrus. "Cerebrus" <zorg***@sify.com> schrieb: True, but I'd only do that for small files...> You don't have the read the entire file one line at a time, but you > could read it in one go, using the ReadToEnd() method. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> |
|||||||||||||||||||||||