public override int Read ([In, Out] char [] dest, int index, int count)
{
if (dest == null)
throw new ArgumentNullException ("dest");
if (index < 0)
throw new ArgumentOutOfRangeException ("index", "< 0");
if (count < 0)
throw new ArgumentOutOfRangeException ("count", "< 0");
// ordered to avoid possible integer overflow
if (index > dest.Length - count)
throw new ArgumentException ("index + count > dest.Length");
try {
return driver.Read (dest, index, count);
} catch (IOException) {
}
return 0;
}