System.Linq.Expressions.Error.ArgumentMustBeSingleDimensionalArrayType C# (CSharp) Метод

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

ArgumentException with message like "Argument must be single dimensional array type"
static private ArgumentMustBeSingleDimensionalArrayType ( string paramName ) : Exception
paramName string
Результат System.Exception
        internal static Exception ArgumentMustBeSingleDimensionalArrayType(string paramName)
        {
            return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType, paramName);
        }
        /// <summary>

Usage Example

Пример #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));
 }
Error