LongValidator Konstruktoren

Definition

Initialisiert eine neue Instanz der LongValidator-Klasse.

Überlädt

LongValidator(Int64, Int64)

Initialisiert eine neue Instanz der LongValidator-Klasse.

LongValidator(Int64, Int64, Boolean)

Initialisiert eine neue Instanz der LongValidator-Klasse.

LongValidator(Int64, Int64, Boolean, Int64)

Initialisiert eine neue Instanz der LongValidator-Klasse.

LongValidator(Int64, Int64)

Quelle:
LongValidator.cs
Quelle:
LongValidator.cs
Quelle:
LongValidator.cs

Initialisiert eine neue Instanz der LongValidator-Klasse.

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)

Parameter

minValue
Int64

Ein Int64-Wert, der die Mindestlänge des long-Werts angibt.

maxValue
Int64

Ein Int64-Wert, der die Höchstlänge des long-Werts angibt.

Hinweise

Der LongValidator Konstruktor stellt sicher, dass der überprüfte long-Wert sowohl einer minimalen als auch einer maximalen Länge entspricht.

Gilt für:

LongValidator(Int64, Int64, Boolean)

Quelle:
LongValidator.cs
Quelle:
LongValidator.cs
Quelle:
LongValidator.cs

Initialisiert eine neue Instanz der LongValidator-Klasse.

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)

Parameter

minValue
Int64

Ein Int64-Wert, der die Mindestlänge des long-Werts angibt.

maxValue
Int64

Ein Int64-Wert, der die Höchstlänge des long-Werts angibt.

rangeIsExclusive
Boolean

Ein Boolean-Wert, der angibt, ob der Validierungsbereich exklusiv ist.

Beispiele

Im folgenden Codebeispiel wird die Verwendung des LongValidator Konstruktors veranschaulicht. Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die LongValidator-Klasse bereitgestellt wird.

// 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)

Hinweise

Wenn der LongValidator Konstruktor verwendet wird, überprüft er sowohl den Minimal- als auch den Höchstwert Int64 sowie, ob der Validierungsbereich exklusiv ist. Wenn der rangeIsExclusive Parameter auf truefestgelegt ist, darf der Int64 Wert nicht zwischen minValue und maxValuesein.

Gilt für:

LongValidator(Int64, Int64, Boolean, Int64)

Quelle:
LongValidator.cs
Quelle:
LongValidator.cs
Quelle:
LongValidator.cs

Initialisiert eine neue Instanz der LongValidator-Klasse.

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)

Parameter

minValue
Int64

Ein Int64-Wert, der die Mindestlänge des long-Werts angibt.

maxValue
Int64

Ein Int64-Wert, der die Höchstlänge des long-Werts angibt.

rangeIsExclusive
Boolean

Ein Boolean-Wert, der angibt, ob der Validierungsbereich exklusiv ist.

resolution
Int64

Ein Int64-Wert, der einen bestimmten Wert angibt, dem entsprochen werden muss.

Ausnahmen

resolution ist gleich oder kleiner als 0.

- oder -

maxValue ist kleiner als minValue.

Hinweise

Wenn Sie angeben resolution, muss der Int64 zu überprüfende Wert gleich diesem Wert sein, um die Validierung zu bestehen.

Gilt für: