Пример #1
0
        public static string AdvanceToLineBlockWithTrim(this StreamReader reader, int lineBlockIndex)
        {
            var line = reader.ReadNonBlankLineWithTrim();

            while (lineBlockIndex > 0)
            {
                reader.AdvanceToBlankLine();
                line = reader.ReadNonBlankLineWithTrim();
                if (line == null)
                {
                    return(null);
                }
                --lineBlockIndex;
            }

            return(line);
        }