TimeSpanValidator Constructor (TimeSpan, TimeSpan, Boolean, Int64)

 

Initializes a new instance of the TimeSpanValidator class, based on supplied parameters.

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

public:
TimeSpanValidator(
	TimeSpan minValue,
	TimeSpan maxValue,
	bool rangeIsExclusive,
	long long resolutionInSeconds
)

Parameters

minValue
Type: System::TimeSpan

A TimeSpan object that specifies the minimum time allowed to pass validation.

maxValue
Type: System::TimeSpan

A TimeSpan object that specifies the maximum time allowed to pass validation.

rangeIsExclusive
Type: System::Boolean

A Boolean value that specifies whether the validation range is exclusive.

resolutionInSeconds
Type: System::Int64

An Int64 value that specifies a number of seconds.

Exception Condition
ArgumentOutOfRangeException

resolutionInSeconds is less than 0.

- or -

minValue is greater than maxValue.

When the resolutionInSeconds parameter is specified, the TimeSpan object being validated must be equal to this value in order to pass validation.

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

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: