Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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);
Posted
Updated 16-Feb-17 22:22pm

1 solution

See the Remarks section at PipeStream.Position Property (System.IO.Pipes)[^]. Always worth reading the documentation first.
 
Share this answer
 
Comments
ttusharbb 17-Feb-17 5:23am    
So how to seek and find end of stream or end of line while using binaryformatter deserialization?
Richard MacCutchan 17-Feb-17 5:26am    
As you can see from the documentation, it is not possible.
ttusharbb 17-Feb-17 5:30am    
so is there another way do you suggest me?
Richard MacCutchan 17-Feb-17 5:47am    
Another way to do something that is not possible?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900