LongValidator Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
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
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
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
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
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.