how to read stream regardless of the position?

mc 3,201 Reputation points

can read stream no matter what the current position is ?

if I have now write the stream then the position will be the length of the stream.

I do not want to change the position and I will write it in another thread.

can I read the data ?

Stream.Seek only return the position but no use of it.

how to read the data with out change the position?

Microsoft Technologies based on the .NET software framework.
2,303 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
3,760 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 9,771 Reputation points Microsoft Vendor

    Hello @mc,

    Use the IRandomAccessStream.GetInputStreamAt(UInt64) Method to return an input stream at a specified location in a stream.

    See EnterpriseDataProtection for a sample.

    0 comments No comments