MESCIUS.ActiveReports.Core.Rdl Assembly / GrapeCity.ActiveReports.PageReportModel.Validation Namespace / ValidationUtils Class / ValidateLength Method / ValidateLength(ExpressionInfo,Length,Length) Method
An GrapeCity.Enterprise.Data.Expressions.ExpressionInfo value to validate.
A GrapeCity.ActiveReports.PageReportModel.Length value representing the minium size allowed.
A GrapeCity.ActiveReports.PageReportModel.Length value representing the maximum size allowed.
Example

ValidateLength(ExpressionInfo,Length,Length) Method
Validates an expression value to make sure it is valid length value and is within the specified min/max range limit.
Syntax
'Declaration
 
Public Overloads Shared Sub ValidateLength( _
   ByVal expression As ExpressionInfo, _
   ByVal min As Length, _
   ByVal max As Length _
) 
 

Parameters

expression
An GrapeCity.Enterprise.Data.Expressions.ExpressionInfo value to validate.
min
A GrapeCity.ActiveReports.PageReportModel.Length value representing the minium size allowed.
max
A GrapeCity.ActiveReports.PageReportModel.Length value representing the maximum size allowed.
Exceptions
ExceptionDescription
Throws if the value is out of range limit.
Example
ExpressionInfo value = ExpressionInfo.FromString("2in");
Length min = new Length("1in");
Length max = new Length("5in");
ValidationUtils.ValidateLength(value, min, max);
See Also