37 if (array ==
null) {
throw new ArgumentNullException(
"array",
"The array cannot be null"); }
38 if (index < 0) {
throw new ArgumentOutOfRangeException(
"index",
"the index must be greater or equal to zero"); }
39 if (array.Length - index < count) {
throw new ArgumentOutOfRangeException(
"array", String.Format(
"the array must have the length of {0} from the index", count)); }
42 public static void CheckIndex(
string name,
int index,
int count)
44 if (index < 0 || index >= count)
52 return new ArgumentOutOfRangeException(name,
string.Format(
"the {0} must be greater or equal to zero and less then {1}", name, count));
56 throw new FormatException(
57 string.Format(
"Cannot parse the text '{0}' because it does not have {1} parts separated by commas in the form {2} with optional parenthesis.",
58 value, count,
string.Format(format,
'X',
'Y',
'Z',
'W')));
static Exception GetThrowIndex(string name, int count)
static void ThrowVectorFormatException(string value, int count, string format)
static void CheckCopy(Scalar[] array, int index, int count)