[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.PageReportModel.Validation.ValidationUtils.ValidateInteger

ValidateInteger Method

ValidateInteger(int, int, int)

Validates an integer value to make sure it is valid and is within the specified min/max range limit.

Declaration
public static int ValidateInteger(int value, int min, int max)
Parameters
Type Name Description
int value

An int value to validate.

int min

An int value representing the minimum integer allowed.

int max

An int value representing the maximum integer allowed.

Returns
Type Description
int
Exceptions
Type Condition
ReportDefinitionException

Throws if the value is out of range limit.

ValidateInteger(int)

Validates an integer value to make sure it is valid and is within the specified usual default RDL min/max range limit (0, int.maxvalue).

Declaration
public static int ValidateInteger(int value)
Parameters
Type Name Description
int value

An int value to validate.

Returns
Type Description
int
Exceptions
Type Condition
ReportDefinitionException

Throws if the value is out of range limit.

ValidateInteger(int?, int, int)

Validates a nullable integer value to make sure it is valid and is within the specified min/max range limit.

Declaration
public static void ValidateInteger(int? value, int min, int max)
Parameters
Type Name Description
int? value

An int value to validate.

int min

An int value representing the minimum integer allowed.

int max

An int value representing the maximum integer allowed.

Exceptions
Type Condition
ReportDefinitionException

Throws if the value is out of range limit.

ValidateInteger(int?)

Validates a nullable integer value to make sure it is valid and is within the specified usual default RDL min/max range limit (0, int.maxvalue).

Declaration
public static void ValidateInteger(int? value)
Parameters
Type Name Description
int? value

An int value to validate.

Exceptions
Type Condition
ReportDefinitionException

Throws if the value is out of range limit.

ValidateInteger(ExpressionInfo, int, int)

Valiates an expression value to make sure it is valid integer value and is within the specified min/max values.

Declaration
public static void ValidateInteger(ExpressionInfo expression, int min, int max)
Parameters
Type Name Description
ExpressionInfo expression

An ExpressionInfo value to validate.

int min

An int value representing the minimun size allowed.

int max

An int value representing the maximum size allowed.

Examples
ExpressionInfo value = ExpressionInfo.FromString("2");
ValidationUtils.ValidateInteger(value, 1, 5);
Exceptions
Type Condition
ReportDefinitionException

Throws if the value is out of range limit.