MaxValueString Property
Collapse the table of content
Expand the table of content

TimeSpanValidatorAttribute.MaxValueString Property


Gets or sets the relative maximum TimeSpan value.

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

public string MaxValueString { get; set; }

Property Value

Type: System.String

The allowed maximum TimeSpan value.

Exception Condition

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.

    DefaultValue = "0:10:0",
    IsRequired = false)]
[TimeSpanValidator(MinValueString = "0:0:30",
    MaxValueString = "5:00:0",
    ExcludeRange = false)]
public TimeSpan MaxIdleTime
        return (TimeSpan)this["maxIdleTime"];
        this["maxIdleTime"] = value;

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft