LongValidator 建構函式

定義

初始化 LongValidator 類別的新執行個體。

多載

名稱 Description
LongValidator(Int64, Int64)

初始化 LongValidator 類別的新執行個體。

LongValidator(Int64, Int64, Boolean)

初始化 LongValidator 類別的新執行個體。

LongValidator(Int64, Int64, Boolean, Int64)

初始化 LongValidator 類別的新執行個體。

LongValidator(Int64, Int64)

來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs

初始化 LongValidator 類別的新執行個體。

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)

參數

minValue
Int64

一個 Int64 指定該值最小 long 長度的值。

maxValue
Int64

一個 Int64 指定該值最大 long 長度的值。

備註

LongValidator建構子確保被驗證的長值同時符合最小與最大長度。

適用於

LongValidator(Int64, Int64, Boolean)

來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs

初始化 LongValidator 類別的新執行個體。

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)

參數

minValue
Int64

一個 Int64 指定該值最小 long 長度的值。

maxValue
Int64

一個 Int64 指定該值最大 long 長度的值。

rangeIsExclusive
Boolean

一個 Boolean 指定驗證範圍是否為排他性的值。

範例

以下程式碼範例示範如何使用 LongValidator 建構子。 此程式碼範例是本類別更大範例 LongValidator 的一部分。

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

備註

當使用建構子時 LongValidator ,會檢查最小值與最大 Int64 值,以及驗證範圍是否互斥。 當 rangeIsExclusive 參數設為 true時,值 Int64 不得介於 minValuemaxValue之間。

適用於

LongValidator(Int64, Int64, Boolean, Int64)

來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs
來源:
LongValidator.cs

初始化 LongValidator 類別的新執行個體。

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)

參數

minValue
Int64

一個 Int64 指定該值最小 long 長度的值。

maxValue
Int64

一個 Int64 指定該值最大 long 長度的值。

rangeIsExclusive
Boolean

一個 Boolean 指定驗證範圍是否為排他性的值。

resolution
Int64

一個 Int64 指定必須匹配的特定值。

例外狀況

resolution 等於或小於 0

-或-

maxValue 小於 minValue

備註

當你指定 時 resolutionInt64 被驗證的值必須等於該值才能通過驗證。

適用於