共用方式為


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

最小可能的值。

適用於