Click here to Skip to main content
15,881,757 members
Articles / Programming Languages / C#

Prefer using Stream to byte[]

Rate me:
Please Sign up or sign in to vote.
5.00/5 (28 votes)
12 Apr 2023CPOL2 min read 26.4K   30  
A short example of how byte[] misuse may hurt memory consumption
While reviewing and refactoring a real-world codebase, I've noticed how byte[] API is misused. That is the reason why in this article I'm sharing some thoughts on why you shouldn't evade Stream API in your code.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
Ukraine Ukraine
Team leader with 8 years of experience in the industry. Applying interest to a various range of topics such as .NET, Go, Typescript and software architecture.

Comments and Discussions