IntegerValidator 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
IntegerValidator 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| IntegerValidator(Int32, Int32) |
IntegerValidator 클래스의 새 인스턴스를 초기화합니다. |
| IntegerValidator(Int32, Int32, Boolean) |
IntegerValidator 클래스의 새 인스턴스를 초기화합니다. |
| IntegerValidator(Int32, Int32, Boolean, Int32) |
IntegerValidator 클래스의 새 인스턴스를 초기화합니다. |
IntegerValidator(Int32, Int32)
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)
매개 변수
설명
이 IntegerValidator 생성자는 확인 중인 정수가 최소 길이와 최대 길이를 모두 준수하도록 합니다.
적용 대상
IntegerValidator(Int32, Int32, Boolean)
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)
매개 변수
- rangeIsExclusive
- Boolean
true 유효성 검사 범위가 배타적임을 지정합니다. 포함은 유효성을 검사할 값이 지정된 범위 내에 있어야 했음을 의미합니다. exclusive는 최솟값 이하이거나 최댓값을 초과해야 했음을 의미합니다.
예제
다음 코드 예제에서는 생성자를 사용 IntegerValidator 하는 방법을 보여 줍니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 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)
설명
클래스의 인스턴스를 IntegerValidator 만들 때 이 IntegerValidator 생성자는 최소값과 최대 Int32 값을 모두 확인하고 유효성 검사 범위가 배타적인지 여부를 확인합니다. 매개 변수를 rangeIsExclusive 설정true하면 값이 Int32 매개 변수 값과 maxValue 매개 변수 값 사이에 minValue 있으면 안 됩니다.
적용 대상
IntegerValidator(Int32, Int32, Boolean, Int32)
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)
매개 변수
예외
설명
Int32 유효성 검사를 통과하려면 유효성 검사 중인 값이 resolution 값과 같아야 합니다.