End of Stream encountered before parsing was completed?

后端 未结 6 643
遇见更好的自我
遇见更好的自我 2020-11-30 09:25

I am trying to deserialize a stream but I always get this error \"End of Stream encountered before parsing was completed\"?

Here is the code:

                


        
6条回答
  •  情话喂你
    2020-11-30 10:21

    In my case I used:

    stream.Seek(0, SeekOrigin.Begin);
    

    after i serialized the stream, and before i deserialized the stream works charm. hope this helps!

提交回复
热议问题