LongValidatorAttribute.ExcludeRange Property    
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
 property bool ExcludeRange { bool get(); void set(bool value); };public bool ExcludeRange { get; set; }member this.ExcludeRange : bool with get, setPublic Property ExcludeRange As BooleanProperty Value
true if the value must be excluded; otherwise, false. The default is false.
Examples
The following example shows how to use the ExcludeRange property.
[ConfigurationProperty("maxUsers", DefaultValue = (long)10000,
    IsRequired = false)]
[LongValidator(MinValue = 1, MaxValue = 10000000,
    ExcludeRange = false)]
public long MaxUsers
{
    get
    {
        return (long)this["maxUsers"];
    }
    set
    {
        this["maxUsers"] = value;
    }
}
<ConfigurationProperty("maxUsers", _
DefaultValue:=10000, _
IsRequired:=False), _
LongValidator(MinValue:=1, _
MaxValue:=10000000, _
ExcludeRange:=False)> _
Public Property MaxUsers() As Long
    Get
        Return Fix(Me("maxUsers"))
    End Get
    Set(ByVal value As Long)
        Me("maxUsers") = value
    End Set
End Property
Remarks
The range is inclusive of the MinValue and MaxValue property values. When the ExcludeRange property value is false, the allowed values are outside the range.