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

最小可能值。

适用于