LongValidator Constructors
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.
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. |
- Source:
- LongValidator.cs
- Source:
- LongValidator.cs
- Source:
- LongValidator.cs
- 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
Remarks
The LongValidator constructor ensures that the long value being verified adheres to both a minimum and a maximum length.
Applies to
.NET 10 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
- Source:
- LongValidator.cs
- Source:
- LongValidator.cs
- Source:
- LongValidator.cs
- 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
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
.NET 10 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
- Source:
- LongValidator.cs
- Source:
- LongValidator.cs
- Source:
- LongValidator.cs
- 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
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
.NET 10 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: