IntegerValidator 생성자

정의

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)

매개 변수

minValue
Int32

Int32 최소값을 지정하는 개체입니다.

maxValue
Int32

Int32 최대값을 지정하는 개체입니다.

설명

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)

매개 변수

minValue
Int32

Int32 최소값을 지정하는 개체입니다.

maxValue
Int32

Int32 최대값을 지정하는 개체입니다.

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)

매개 변수

minValue
Int32

정수 Int32 값의 최소 길이를 지정하는 개체입니다.

maxValue
Int32

정수 Int32 값의 최대 길이를 지정하는 개체입니다.

rangeIsExclusive
Boolean

Boolean 유효성 검사 범위가 배타적인지 여부를 지정하는 값입니다.

resolution
Int32

Int32 일치해야 하는 값을 지정하는 개체입니다.

예외

resolution 가 .보다 0작습니다.

-또는-

minValuemaxValue보다 큽니다.

설명

Int32 유효성 검사를 통과하려면 유효성 검사 중인 값이 resolution 값과 같아야 합니다.

적용 대상