You can't use NetworkStream directly as it won't allow seeking back and forth to do the parsing. And anyway it wouldn't be a good idea as any network issue (timeout, connection reset, ...) would break parsing. You should just write it to a MemoryStream or a FileStream and then do the parsing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I try to use a NetworkStream, but I get an error because of Position property and Stream Length property too.
So is it possible ?
Thanks.
You can't use NetworkStream directly as it won't allow seeking back and forth to do the parsing. And anyway it wouldn't be a good idea as any network issue (timeout, connection reset, ...) would break parsing. You should just write it to a MemoryStream or a FileStream and then do the parsing.