LongValidatorAttribute.MaxValue 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.
Gets or sets the maximum value allowed for the property.
public:
property long MaxValue { long get(); void set(long value); };
public long MaxValue { get; set; }
member this.MaxValue : int64 with get, set
Public Property MaxValue As Long
Property Value
A long integer that indicates the allowed maximum value.
Exceptions
The selected value is less than MinValue.
Examples
The following example shows how to use the MaxValue 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 MaxValue property value is included in the allowed range.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา