instead of (bytesRead == 0) you would test (bytesRead == 0 || sourceStream.Position >= endPoint)
↧
instead of (bytesRead == 0) you would test (bytesRead == 0 || sourceStream.Position >= endPoint)