08-19-2012, 08:57 PM
Here's a cool snippet I came up with to read using a StreamReader in chunks based on an input of how many lines you want to read at a time until the end of the Stream for the file.
Good example usage for where the null coalescing operator in C# comes in nicely as well :ok:
I used the fully fleged StringBuilder just in case we're dealing with a fair bit of lines based on the lnBufferCount for determining the buffer size for the string we're dealing with through the loop.
Enjoy
Good example usage for where the null coalescing operator in C# comes in nicely as well :ok:
I used the fully fleged StringBuilder just in case we're dealing with a fair bit of lines based on the lnBufferCount for determining the buffer size for the string we're dealing with through the loop.
Hidden Content
Enjoy