System.StreamExtensions.ReadByteNoAlloc C# (CSharp) Méthode

ReadByteNoAlloc() public static méthode

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