IntegerValidatorAttribute クラス
アセンブリ: System.Configuration (system.configuration.dll 内)

<AttributeUsageAttribute(AttributeTargets.Property)> _ Public NotInheritable Class IntegerValidatorAttribute Inherits ConfigurationValidatorAttribute
[AttributeUsageAttribute(AttributeTargets.Property)] public sealed class IntegerValidatorAttribute : ConfigurationValidatorAttribute
[AttributeUsageAttribute(AttributeTargets::Property)] public ref class IntegerValidatorAttribute sealed : public ConfigurationValidatorAttribute

IntegerValidatorAttribute を使用して、.NET Framework が IntegerValidator オブジェクトを使用してプロパティを検証するように指示する構成プロパティを装飾し、装飾のパラメータの値を渡します。

IntegerValidatorAttribute オブジェクトを使用して、カスタム ConfigurationSection オブジェクトのプロパティを装飾する方法を、次のコード例に示します。
<ConfigurationProperty("maxAttempts", _ DefaultValue:=101, _ IsRequired:=True), _ IntegerValidator(MinValue:=1, _ MaxValue:=100, _ ExcludeRange:=True)> _ Public Property MaxAttempts() As Integer Get Return Fix(Me("maxAttempts")) End Get Set(ByVal value As Integer) Me("maxAttempts") = value End Set End Property

System.Attribute
System.Configuration.ConfigurationValidatorAttribute
System.Configuration.IntegerValidatorAttribute


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- IntegerValidatorAttribute クラスのページへのリンク