If you are developing an API, or even inside your own code, and your method accepts Stream , is your method obligated to check the position and reset to the beginning, provided that CanSeek is true before use?
If so, why is there no method that does all this in the Stream class itself?
Over the years, I have been caught several times, suggesting that Stream enters my method at position 0.
And is reset Stream correct, where possible, after using it?
Alternatively, should Stream always copy, not transfer directly? Seems a bit overkill to me.
c #
Luke puplett
source share