IntegerValidator Konstruktory
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje nowe wystąpienie klasy IntegerValidator.
Przeciążenia
| Nazwa | Opis |
|---|---|
| IntegerValidator(Int32, Int32) |
Inicjuje nowe wystąpienie klasy IntegerValidator. |
| IntegerValidator(Int32, Int32, Boolean) |
Inicjuje nowe wystąpienie klasy IntegerValidator. |
| IntegerValidator(Int32, Int32, Boolean, Int32) |
Inicjuje nowe wystąpienie klasy IntegerValidator. |
IntegerValidator(Int32, Int32)
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
Inicjuje nowe wystąpienie klasy IntegerValidator.
public:
IntegerValidator(int minValue, int maxValue);
public IntegerValidator(int minValue, int maxValue);
new System.Configuration.IntegerValidator : int * int -> System.Configuration.IntegerValidator
Public Sub New (minValue As Integer, maxValue As Integer)
Parametry
Uwagi
Ten IntegerValidator konstruktor zapewnia, że zweryfikowana liczba całkowita jest zgodna zarówno z minimalną, jak i maksymalną długością.
Dotyczy
IntegerValidator(Int32, Int32, Boolean)
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
Inicjuje nowe wystąpienie klasy IntegerValidator.
public:
IntegerValidator(int minValue, int maxValue, bool rangeIsExclusive);
public IntegerValidator(int minValue, int maxValue, bool rangeIsExclusive);
new System.Configuration.IntegerValidator : int * int * bool -> System.Configuration.IntegerValidator
Public Sub New (minValue As Integer, maxValue As Integer, rangeIsExclusive As Boolean)
Parametry
- rangeIsExclusive
- Boolean
true aby określić, że zakres weryfikacji jest wyłączny. Inkluzywne oznacza, że wartość do zweryfikowania musi należeć do określonego zakresu; wartość wyłączna oznacza, że musi być poniżej minimum lub powyżej wartości maksymalnej.
Przykłady
W poniższym przykładzie kodu pokazano, jak używać konstruktora IntegerValidator . Ten przykład kodu jest częścią większego przykładu udostępnionego dla klasy IntegerValidator.
// Create Validator for the range of 1 to 10 inclusive
int minIntVal = 1;
int maxIntVal = 10;
bool exclusive = false;
IntegerValidator integerValidator =
new IntegerValidator(minIntVal, maxIntVal, exclusive);
' Create Validator for the range of 1 to 10 inclusive
Dim minIntVal As Int32 = 1
Dim maxIntVal As Int32 = 10
Dim exclusive As Boolean = False
Dim validator As IntegerValidator = _
New IntegerValidator(minIntVal, maxIntVal, exclusive)
Uwagi
Podczas tworzenia wystąpienia IntegerValidator klasy ten IntegerValidator konstruktor sprawdza zarówno wartości minimalne, jak i maksymalne Int32 , a także czy zakres weryfikacji jest wyłączny.
rangeIsExclusive Gdy parametr jest ustawiony na truewartość , Int32 wartość nie może być między wartościami parametrów minValue i maxValue .
Dotyczy
IntegerValidator(Int32, Int32, Boolean, Int32)
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
- Źródło:
- IntegerValidator.cs
Inicjuje nowe wystąpienie klasy IntegerValidator.
public:
IntegerValidator(int minValue, int maxValue, bool rangeIsExclusive, int resolution);
public IntegerValidator(int minValue, int maxValue, bool rangeIsExclusive, int resolution);
new System.Configuration.IntegerValidator : int * int * bool * int -> System.Configuration.IntegerValidator
Public Sub New (minValue As Integer, maxValue As Integer, rangeIsExclusive As Boolean, resolution As Integer)
Parametry
Wyjątki
resolution wartość jest mniejsza niż 0.
— lub —
minValue jest większa niż maxValue.
Uwagi
Weryfikowana Int32 wartość musi być równa resolution wartości, aby można było przejść walidację.