ArgumentMustBeSingleDimensionalArrayType() статический приватный Метод

ArgumentException with message like "Argument must be single dimensional array type"
static private ArgumentMustBeSingleDimensionalArrayType ( string paramName ) : Exception
paramName string
Результат System.Exception
Пример #1
0
 //CONFORMING
 public static UnaryExpression ArrayLength(Expression array)
 {
     ContractUtils.RequiresNotNull(array, "array");
     if (!array.Type.IsArray || !typeof(Array).IsAssignableFrom(array.Type))
     {
         throw Error.ArgumentMustBeArray();
     }
     if (array.Type.GetArrayRank() != 1)
     {
         throw Error.ArgumentMustBeSingleDimensionalArrayType();
     }
     return(new UnaryExpression(ExpressionType.ArrayLength, array, typeof(int), null));
 }