public static void ThrowExceptionWhenIsTooLong(Expression <Func <object> > paramExpression, int maxLength) { Validators.ThrowExceptionWhenIsNull((Expression <Func <object> >)(() => paramExpression)); Validators.ThrowExceptionWhenIsNegativeOrZero((Expression <Func <object> >)(() => (object)maxLength)); Validators.ThrowExceptionWhenIsTooLong(Validators.GetParamName(paramExpression), Validators.GetParamValue(paramExpression) as string, maxLength); }