TimeSpanValidatorAttribute.MaxValueString Property

 

Gets or sets the relative maximum TimeSpan value.

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

Public Property MaxValueString As String

Property Value

Type: System.String

The allowed maximum TimeSpan value.

Exception Condition
ArgumentOutOfRangeException

The selected value represents less than MinValue.

This is the relative maximum value as set by the user.

The following example shows how to use the MaxValueString property.

<ConfigurationProperty("maxIdleTime", _
DefaultValue:="0:10:0", _
IsRequired:=False), _
TimeSpanValidator(MinValueString:="0:0:30", _
MaxValueString:="5:00:0", _
ExcludeRange:=False)> _
Public Property MaxIdleTime() As TimeSpan
    Get
        Return CType(Me("maxIdleTime"), TimeSpan)
    End Get
    Set(ByVal value As TimeSpan)
        Me("maxIdleTime") = value
    End Set
End Property

.NET Framework
Available since 2.0
Return to top
Show: