© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
Jake

Read from memory stream at position

I am trying to read from a memory stream at the position its currently in. I have tried to use memoryStream.Read() but since I will not know how big the file is I can't use byte[] cipher = new byte[128] for example. It needs to be as big as what is left in the memory stream. I was trying to use memoryStream.ToArray() but that ignores the position the memory stream is at.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Can't read from MemoryStream from current position
C#CC# / help
3y ago
✅ Cancel stream read
C#CC# / help
3y ago
read TCP stream issue
C#CC# / help
4y ago
❔ SQLite in-memory Database read from ReadOnlyMemory bytes
C#CC# / help
4y ago