OpenRA.StreamExts.Peek C# (CSharp) Method

Peek() public static method

public static Peek ( this s ) : int
s this
return int
        public static int Peek(this Stream s)
        {
            var b = s.ReadByte();
            if (b == -1)
                return -1;
            s.Seek(-1, SeekOrigin.Current);
            return (byte)b;
        }