Modifier

Partager via


LongValidator Constructors

Definition

Initializes a new instance of the LongValidator class.

Overloads

LongValidator(Int64, Int64)

Initializes a new instance of the LongValidator class.

LongValidator(Int64, Int64, Boolean)

Initializes a new instance of the LongValidator class.

LongValidator(Int64, Int64, Boolean, Int64)

Initializes a new instance of the LongValidator class.

LongValidator(Int64, Int64)

Source:
LongValidator.cs
Source:
LongValidator.cs
Source:
LongValidator.cs

Initializes a new instance of the LongValidator class.

public:
 LongValidator(long minValue, long maxValue);
public LongValidator (long minValue, long maxValue);
new System.Configuration.LongValidator : int64 * int64 -> System.Configuration.LongValidator
Public Sub New (minValue As Long, maxValue As Long)

Parameters

minValue
Int64

An Int64 value that specifies the minimum length of the long value.

maxValue
Int64

An Int64 value that specifies the maximum length of the long value.

Remarks

The LongValidator constructor ensures that the long value being verified adheres to both a minimum and a maximum length.

Applies to

LongValidator(Int64, Int64, Boolean)

Source:
LongValidator.cs
Source:
LongValidator.cs
Source:
LongValidator.cs

Initializes a new instance of the LongValidator class.

public:
 LongValidator(long minValue, long maxValue, bool rangeIsExclusive);
public LongValidator (long minValue, long maxValue, bool rangeIsExclusive);
new System.Configuration.LongValidator : int64 * int64 * bool -> System.Configuration.LongValidator
Public Sub New (minValue As Long, maxValue As Long, rangeIsExclusive As Boolean)

Parameters

minValue
Int64

An Int64 value that specifies the minimum length of the long value.

maxValue
Int64

An Int64 value that specifies the maximum length of the long value.

rangeIsExclusive
Boolean

A Boolean value that specifies whether the validation range is exclusive.

Examples

The following code example demonstrates how to use the LongValidator constructor. This code example is part of a larger example provided for the LongValidator class.

// Create Long and Validator.
Int64 testLong =    17592186044416;
Int64 minLongVal =  1099511627776;
Int64 maxLongVal =  281474976710656;
LongValidator myLongValidator = 
 new LongValidator(minLongVal, maxLongVal, false);
' Create Long and Validator.
Dim testLong As Int64 = 17592186044416
Dim minLongVal As Int64 = 1099511627776
Dim maxLongVal As Int64 = 281474976710656
Dim myLongValidator As LongValidator = _
 New LongValidator(minLongVal, maxLongVal, False)

Remarks

When the LongValidator constructor is used, it checks both the minimum and maximum Int64 values, as well as whether the validation range is exclusive. When the rangeIsExclusive parameter is set to true, the Int64 value must not be between minValue and maxValue.

Applies to

LongValidator(Int64, Int64, Boolean, Int64)

Source:
LongValidator.cs
Source:
LongValidator.cs
Source:
LongValidator.cs

Initializes a new instance of the LongValidator class.

public:
 LongValidator(long minValue, long maxValue, bool rangeIsExclusive, long resolution);
public LongValidator (long minValue, long maxValue, bool rangeIsExclusive, long resolution);
new System.Configuration.LongValidator : int64 * int64 * bool * int64 -> System.Configuration.LongValidator
Public Sub New (minValue As Long, maxValue As Long, rangeIsExclusive As Boolean, resolution As Long)

Parameters

minValue
Int64

An Int64 value that specifies the minimum length of the long value.

maxValue
Int64

An Int64 value that specifies the maximum length of the long value.

rangeIsExclusive
Boolean

A Boolean value that specifies whether the validation range is exclusive.

resolution
Int64

An Int64 value that specifies a specific value that must be matched.

Exceptions

resolution is equal to or less than 0.

-or-

maxValue is less than minValue.

Remarks

When you specify the resolution, the Int64 value being validated must be equal to that value in order to pass validation.

Applies to