* [ Mike Kestner <[EMAIL PROTECTED]> * Tue, 02 Jul 2002 23:45:21 +0200 ] > I think this change is incorrect. > > If the stream is not seekable, there is no way to back up from the peek, > and peek is not supposed to consume. Besides, the MS docs on the method > explicitly state that -1 is supposed to be returned if Peek is called on > a non-seekable stream.
I was getting an error in a StreamReader that wraps a NetworkStream. I got a "\r" from StreamReader.ReadLine cause Peek always returned -1 cause you cannot seek a NetworkStream. With MS runtime, it worked fine, so i supposed they don't check for CanSeek in StreamReader.Peek (), which does not need any seek operation to be done, just reading one more char and keep it buffered. Do you still think that i'm wrong? -- Gonzalo Paniagua Javier <[EMAIL PROTECTED]> http://www.gnome-db.org/~gonzalo/ _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
