Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

LongValidator Constructor (Int64, Int64, Boolean)

Note: This constructor is new in the .NET Framework version 2.0.

Initializes an instance of the LongValidator class based on supplied parameters.

Namespace: System.Configuration
Assembly: System.Configuration (in system.configuration.dll)

public LongValidator (
	long minValue,
	long maxValue,
	bool rangeIsExclusive
)
public LongValidator (
	long minValue, 
	long maxValue, 
	boolean rangeIsExclusive
)
public function LongValidator (
	minValue : long, 
	maxValue : long, 
	rangeIsExclusive : boolean
)

Parameters

minValue

An Int64 specifying the minimum length of the long value.

maxValue

An Int64 specifying the maximum length of the long value.

rangeIsExclusive

A Boolean value specifying whether the validation range is exclusive.

When the LongValidator constructor is used, it checks both the minimum and maximum Int64 values, as well as whether the validation range is exclusive. When the rangeIsExclusive parameter is set to true, the Int64 value must not be between minValue and maxValue.

The following code example demonstrates how to use the LongValidator constructor. This code example is part of a larger example provided for the LongValidator class.

// Create Long and Validator.
Int64 testLong =    17592186044416;
Int64 minLongVal =  1099511627776;
Int64 maxLongVal =  281474976710656;
LongValidator myLongValidator = 
 new LongValidator(minLongVal, maxLongVal, false);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft