System.StreamExtensions.ReadByteNoAlloc C# (CSharp) Method

ReadByteNoAlloc() public static method

public static ReadByteNoAlloc ( this stream ) : byte
stream this
return byte
        public static byte ReadByteNoAlloc(this Stream stream)
        {
            var buffer = Buffer;
            if (stream.Read(buffer, 0, 1) == 0)
                throw new EndOfStreamException();
            return buffer[0];
        }