Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have 2 byte arrays. I'm creating 2 ReadOnlyMemory<byte> and assigning those arrays to each respectively.
Now how do i add those 2 ReadOnlyMemory<byte> to a ReadOnlySequence<byte> ?

What I have tried:

private ReadOnlySequence<byte> _sequence;

var firstBuffer = new ReadOnlyMemory<byte>(GetFirstBuffer());
var secondBuffer = new ReadOnlyMemory<byte>(GetSecondBuffer());

Now I want to add firstBuffer and secondBuffer into _sequence.
Posted
Updated 25-May-20 21:21pm

1 solution

 
Share this answer
 
Comments
Jacxx 26-May-20 22:13pm    
Excellent!! That helped. Thank you.
OriginalGriff 27-May-20 1:42am    
You're welcome!

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900