J
jabailo
Which would be faster for counting lines in a StreamReader:
(a) iterate through a file using .ReadLine() and adding to a counter, i++
(b) doing a .ReadToEnd() and then using an IndexOf() method to count the
occurances of \r\n
(c) doing a .ReadToEnd() and using a RegEx to count the number of occurances
of \r\n
(a) iterate through a file using .ReadLine() and adding to a counter, i++
(b) doing a .ReadToEnd() and then using an IndexOf() method to count the
occurances of \r\n
(c) doing a .ReadToEnd() and using a RegEx to count the number of occurances
of \r\n