Public feed
#721461
public long Read (long offset, char [] buffer, int offsetInBuffer, int count)
{
if (count > this.MaxLength || count > buffer.Length ||
count < 0 || ((offsetInBuffer + count) > buffer.Length))
throw new ArgumentOutOfRangeException ("Parameter name: count");
if (offset < 0 || offset > MaxLength)
throw new ArgumentOutOfRangeException ("Parameter name: offset");
if (offsetInBuffer < 0 || offsetInBuffer > buffer.Length)
throw new ArgumentOutOfRangeException ("Parameter name: offsetInBuffer");
if (buffer == null)
throw new ArgumentNullException ("Parameter name: buffer");
/* LAMESPEC: If count specifies more characters than what is available from
offset to the Length of the SqlChars instance, only the available
characters are copied
*/
/* Final count of what will be copied */
int actualCount = Math.Abs (count - offset);
Array.Copy (this.buffer, offset, buffer, offsetInBuffer, actualCount);
return actualCount;
}