NumericAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
對數值欄位或屬性中可能的值設限。
[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 |
最小可能值。 |