ServiceStack.StreamExt.ToUtf8String C# (CSharp) Method

ToUtf8String() public static method

public static ToUtf8String ( this stream ) : string
stream this
return string
        public static string ToUtf8String(this Stream stream)
        {
            if (stream == null)
                throw new ArgumentNullException(nameof(stream));

            using (var reader = new StreamReader(stream, Encoding.UTF8))
            {
                return reader.ReadToEnd();
            }
        }