I'm not sure where that AsyncExtensions class comes from. Maybe that's the Windows Phone 7 SDK that I don't currently use or have anymore.
Looking at the .NET 4.5 implementation of StreamReader.ReadToEndAsync, it doesn't look like they use Length either. What determines the end of a stream is if any bytes are returned on a Stream.Read.
Looking at the .NET 4.5 implementation of StreamReader.ReadToEndAsync, it doesn't look like they use Length either. What determines the end of a stream is if any bytes are returned on a Stream.Read.