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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > LongValidatorAttribute クラスの意味・解説 

LongValidatorAttribute クラス

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

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

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

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

LongValidatorAttribute使用して構成プロパティ装飾します。これは、.NET Framework に LongValidator オブジェクト使用してプロパティ検証するように指示し装飾パラメータの値を渡すためです。

LongValidatorAttribute は、プロパティ型だけに適用できます

使用例使用例

LongValidatorAttribute使用してカスタム ConfigurationSection オブジェクトプロパティ装飾する方法を、次のコード例示します

<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
[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;
    }
}
継承階層継承階層
System.Object
   System.Attribute
     System.Configuration.ConfigurationValidatorAttribute
      System.Configuration.LongValidatorAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LongValidatorAttribute メンバ
System.Configuration 名前空間
ConfigurationValidatorAttribute クラス
ConfigurationSection クラス
ConfigurationPropertyAttribute クラス
LongValidator クラス



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

辞書ショートカット

すべての辞書の索引

「LongValidatorAttribute クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS