IntegerValidatorAttributeとは? わかりやすく解説

IntegerValidatorAttribute クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

.NET Framework構成プロパティに対して整数検証実行するように、宣言によって指示します。このクラス継承できません。

名前空間: System.Configuration
アセンブリ: System.Configuration (system.configuration.dll 内)
構文構文

<AttributeUsageAttribute(AttributeTargets.Property)> _
Public NotInheritable Class
 IntegerValidatorAttribute
    Inherits ConfigurationValidatorAttribute
Dim instance As IntegerValidatorAttribute
[AttributeUsageAttribute(AttributeTargets.Property)] 
public sealed class IntegerValidatorAttribute
 : ConfigurationValidatorAttribute
[AttributeUsageAttribute(AttributeTargets::Property)] 
public ref class IntegerValidatorAttribute
 sealed : public ConfigurationValidatorAttribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Property) */ 
public final class IntegerValidatorAttribute
 extends ConfigurationValidatorAttribute
AttributeUsageAttribute(AttributeTargets.Property) 
public final class IntegerValidatorAttribute
 extends ConfigurationValidatorAttribute
解説解説

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

IntegerValidatorAttribute オブジェクトは、プロパティ型だけに適用できます

使用例使用例

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
[ConfigurationProperty("maxAttempts", DefaultValue = 101,
    IsRequired = true)]
[IntegerValidator(MinValue = 1, MaxValue = 100,
    ExcludeRange = true)]
public int MaxAttempts
{
    get
    {
        return (int)this["maxAttempts"];
    }
    set
    {
        this["maxAttempts"] = value;
    }
}
継承階層継承階層
System.Object
   System.Attribute
     System.Configuration.ConfigurationValidatorAttribute
      System.Configuration.IntegerValidatorAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IntegerValidatorAttribute メンバ
System.Configuration 名前空間
ConfigurationValidatorAttribute クラス
ConfigurationSection クラス
ConfigurationPropertyAttribute クラス
IntegerValidator クラス

IntegerValidatorAttribute コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

IntegerValidatorAttribute クラス新しインスタンス作成します

名前空間: System.Configuration
アセンブリ: System.Configuration (system.configuration.dll 内)
構文構文

Dim instance As New IntegerValidatorAttribute
public IntegerValidatorAttribute ()
public:
IntegerValidatorAttribute ()
public IntegerValidatorAttribute ()
public function IntegerValidatorAttribute ()
解説解説
使用例使用例

IntegerValidatorAttribute コンストラクタ使用する例を次に示します

<ConfigurationProperty("maxSize", _
DefaultValue:=1000, _
IsRequired:=True), _
IntegerValidator()> _
Public Property MaxSize() As
 Integer
    Get
        Return Fix(Me("maxSize"))
    End Get
    Set(ByVal value As Integer)
        Me("maxSize") = value
    End Set
End Property
[ConfigurationProperty("maxSize", DefaultValue = 1000,
    IsRequired = true)]
[IntegerValidator()]
public int MaxSize
{
    get
    {
        return (int)this["maxSize"];
    }
    set
    {
        this["maxSize"] = value;
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IntegerValidatorAttribute クラス
IntegerValidatorAttribute メンバ
System.Configuration 名前空間

IntegerValidatorAttribute プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ ExcludeRange 整数を、MinValue プロパティ値と MaxValue プロパティ値によって定義され範囲内含めるか、その範囲から除外するかを示す値を取得または設定します
パブリック プロパティ MaxValue プロパティ指定できる最大値取得または設定します
パブリック プロパティ MinValue プロパティ指定できる最小値取得または設定します
パブリック プロパティ TypeId  派生クラス実装されている場合は、この Attribute一意識別子取得します。 ( Attribute から継承されます。)
パブリック プロパティ ValidatorInstance オーバーライドされます。 IntegerValidator クラスインスタンス取得します
パブリック プロパティ ValidatorType  検証コントロール属性の型を取得します。 ( ConfigurationValidatorAttribute から継承されます。)
参照参照

関連項目

IntegerValidatorAttribute クラス
System.Configuration 名前空間
ConfigurationValidatorAttribute クラス
ConfigurationSection クラス
ConfigurationPropertyAttribute クラス
IntegerValidator クラス

IntegerValidatorAttribute メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用され指定した型のカスタム属性取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されカスタム属性配列取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスハッシュ コード返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラス既定値かどうか示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます指定した型のカスタム属性が、アセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されているかどうか判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンス等しかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

IntegerValidatorAttribute クラス
System.Configuration 名前空間
ConfigurationValidatorAttribute クラス
ConfigurationSection クラス
ConfigurationPropertyAttribute クラス
IntegerValidator クラス

IntegerValidatorAttribute メンバ

.NET Framework構成プロパティに対して整数検証実行するように、宣言によって指示します。このクラス継承できません。

IntegerValidatorAttribute データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド IntegerValidatorAttribute IntegerValidatorAttribute クラス新しインスタンス作成します
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ ExcludeRange 整数を、MinValue プロパティ値と MaxValue プロパティ値によって定義され範囲内含めるか、その範囲から除外するかを示す値を取得または設定します
パブリック プロパティ MaxValue プロパティ指定できる最大値取得または設定します
パブリック プロパティ MinValue プロパティ指定できる最小値取得または設定します
パブリック プロパティ TypeId  派生クラス実装されている場合は、この Attribute一意識別子取得します。(Attribute から継承されます。)
パブリック プロパティ ValidatorInstance オーバーライドされます。 IntegerValidator クラスインスタンス取得します
パブリック プロパティ ValidatorType  検証コントロール属性の型を取得します。(ConfigurationValidatorAttribute から継承されます。)
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用され指定した型のカスタム属性取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されカスタム属性配列取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスハッシュ コード返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラス既定値かどうか示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます指定した型のカスタム属性が、アセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されているかどうか判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンス等しかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

IntegerValidatorAttribute クラス
System.Configuration 名前空間
ConfigurationValidatorAttribute クラス
ConfigurationSection クラス
ConfigurationPropertyAttribute クラス
IntegerValidator クラス


このページでは「.NET Framework クラス ライブラリ リファレンス」からIntegerValidatorAttributeを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIntegerValidatorAttributeを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIntegerValidatorAttribute を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「IntegerValidatorAttribute」の関連用語

IntegerValidatorAttributeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IntegerValidatorAttributeのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS