Thursday November 26th

Wednesday November 25th

Reading large files in chunks with proper encapsulation

I've been doing some work lately which involves sequentially reading large files (> 2 to 5GB). This entails that it's not an option to read the whole structure in memory; it's more reliable to process the file in chunks. I occasionally come across legacy that solves exactly this problem, but in a procedural way, resulting in tangled spaghetti. To be honest, the first piece of software I ever wrote in a professional setting also went at it in the wrong way. There is no reason to let it come to this though; you can use the often overlooked yield return keyword to improve encapsulation.


Great article! very interesting! Like the style and very easy to understand and read

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network