BrandGhost
ONLY 0.7% Of The Memory Allocations When Downloading In C#!

ONLY 0.7% Of The Memory Allocations When Downloading In C#!

A 20MB file isn't all that big -- unless you're stuck with dial-up internet. Remember that? But what IS big is the difference in memory allocation that we can have when we use a couple of helpful tips when downloading files in C#. The default mechanism using the HttpClient in C# means that we'll allocate the file to a memory stream. However, using the techniques from my previous videos on this topic we can scale that WAY back to less than 1% of the memory allocation to download the very same file.
An error has occurred. This application may no longer respond until reloaded. Reload