ServiceStack.StreamExtensions.ReadLines C# (CSharp) Méthode

ReadLines() public static méthode

public static ReadLines ( this stream ) : IEnumerable
stream this
Résultat IEnumerable
        public static IEnumerable<string> ReadLines(this Stream stream)
        {
            if (stream == null)
                throw new ArgumentNullException("stream");

            using (var reader = new StreamReader(stream))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    yield return line;
                }
            }
        }