如何在使用二进制格式反序列化时寻找namedpipeclientstream? [英] How to seek namedpipeclientstream while using binaryformatter deserialization?
本文介绍了如何在使用二进制格式反序列化时寻找namedpipeclientstream?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我正在使用nammedpipeclientstream。我无法使用s.Position = 0;
我尝试了什么:
IFormatter formatter = new BinaryFormatter();
clientStream.Position = 0;
data =(string)formatter.Deserialize(clientStream);
if I am using nammedpipeclientstream. I am not able to use s.Position = 0;
What I have tried:
IFormatter formatter = new BinaryFormatter();
clientStream.Position = 0;
data = (string)formatter.Deserialize(clientStream);
推荐答案
请参阅 PipeStream.Position属性(System.IO.Pipes) [ ^ ]。总是值得一读文档。
See the Remarks section at PipeStream.Position Property (System.IO.Pipes)[^]. Always worth reading the documentation first.
这篇关于如何在使用二进制格式反序列化时寻找namedpipeclientstream?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文