Language

NumericAttribute クラス

定義

数値フィールドやプロパティ内の可能な値の制限を設けてください。

[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
[System.Serializable]
public class NumericAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
[<System.Serializable>]
type NumericAttribute = class
    inherit Attribute
Public Class NumericAttribute
Inherits Attribute
継承
NumericAttribute
属性

注釈

デフォルトでは、制限は基礎となるフィールドタイプの最小値と最大値です。

コンストラクター

名前 説明
NumericAttribute(Double, Double)

数フィールドの可能な値の範囲を指定します。

フィールド

名前 説明
Max

最大可能な価値。

Min

最小可能な値。

適用対象