RangeAttribute 類別

定義

指出資料欄位值的數值範圍條件約束。

public ref class RangeAttribute sealed : Attribute
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Parameter)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
class RangeAttribute final : Attribute
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Parameter)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
public sealed class RangeAttribute : Attribute
function RangeAttribute(minValue, maxValue)
Public NotInheritable Class RangeAttribute
Inherits Attribute
繼承
RangeAttribute
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.FoundationContract (已於 v1.0 引進)

建構函式

RangeAttribute(Int32, Int32)

使用指定的最小值和最大值,建立並初始化 屬性的新實例。

適用於

另請參閱