SwissArmyKnife adds the following extension methods to Stream:
Stream
Reset()
A Stream doesn't have a built-in method to reset the pointer to the beginning, you have to use Seek():
Seek()
using (var ms = new MemoryStream()) { ms.Seek(0, SeekOrigin.Begin); }
The Reset() extension methods simplifies this and makes it easier to read:
using (var ms = new MemoryStream()) { ms.Reset(); }
There was an error while loading. Please reload this page.