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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > 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 クラス



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

辞書ショートカット

すべての辞書の索引

「IntegerValidatorAttribute クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS