Пример #1
0
        /// <summary>
        /// Reads a specified number of string pieces delimited by whitespaces defined by <see cref="char.IsWhiteSpace(char)"/>.
        /// </summary>
        /// <param name="reader">A <see cref="TextReader" /> object.</param>
        /// <param name="count">The number of string pieces to read.</param>
        /// <returns>An array of <see cref="string"/> pieces retrieved from the <paramref name="reader"/>.</returns>
        public static string[] ReadPieces(this TextReader reader, int count)
        {
            var output = new string[count];

            for (int i = 0; i < count; ++i)
            {
                output[i] = reader.ReadPiece();
            }
            return(output);
        }