MemoryStream.Position or MemoryStream.Seek does not work (Silverlight)

僤鯓⒐⒋嵵緔 提交于 2019-12-06 15:44:31

Is it possible that another of your properties is being triggered in the debugger, and reading through the stream?

Rather than using the debugger, what happens if you log (or show on a message box):

Log("Position = " + stream.Position);
stream.Position = 0;
Log("Position = " + stream.Position);

Does that show the same non-zero number twice? I find it hard to believe that MemoryStream is that broken.

Btw, a simpler way of using MemoryStream for copying than manually copying everything is to call WriteTo with the FileStream as an argument.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!