語言

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
屬性

備註

預設限制是底層欄位類型的最小值與最大值。

建構函式

名稱 Description
NumericAttribute(Double, Double)

指定一個數字欄位可能的值範圍。

欄位

名稱 Description
Max

最大可能的價值。

Min

最小可能值。

適用於