次の方法で共有


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

最小値を指定できます。

適用対象