Itenso.Rtf.Parser.RtfParser.PeekNextChar C# (CSharp) Method

PeekNextChar() private static method

private static PeekNextChar ( TextReader reader, bool mandatory ) : int
reader TextReader
mandatory bool
return int
        private static int PeekNextChar( TextReader reader, bool mandatory )
        {
            int character = reader.Peek();
            if ( mandatory && character == -1 )
            {
                throw new RtfMultiByteEncodingException( Strings.EndOfFileInvalidCharacter );
            }
            return character;
        }