public static void Clear(Array array, int index, int length)
{
if (array == null)
{
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
}
if (length < 0)
{
ThrowHelper.ThrowIndexOutOfRangeException();
}
int low = array.GetLowerBound(0);
if (index < low)
{
ThrowHelper.ThrowIndexOutOfRangeException();
}
index = index - low;
// re-ordered to avoid possible integer overflow
if (index > array.Length - length)
{
ThrowHelper.ThrowIndexOutOfRangeException();
}
ClearInternal(array, index, length);
}