ONLY 0.7% Of The Memory Allocations When Downloading In C#!
June 6, 2024
• 695 views
c#dotnet.netstream in .netdownload video in C#download file in C#c# webclient download filec# download file from urlhow to download a file from internet using c#download file c#how to download files in c#download files in C#streams in C#async streamsfiles and streams in c#c# streamsc# streams explained.net corestreams in c#memorystream in c#C# tutorialC# for beginnersmicrosoftweb developmentpaktcoding tutorialdotnet tutorial
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.
