RangeAttribute.IsValid(Object) 方法

定义

检查数据字段的值是否在指定的范围中。Checks that the value of the data field is in the specified range.

public:
 override bool IsValid(System::Object ^ value);
public override bool IsValid (object value);
public override bool IsValid (object? value);
override this.IsValid : obj -> bool
Public Overrides Function IsValid (value As Object) As Boolean

参数

value
Object

要验证的数据字段值。The data field value to validate.

返回

Boolean

如果指定的值在此范围中,则为 true;否则为 falsetrue if the specified value is in the range; otherwise, false.

例外

数据字段值不在允许的范围内。The data field value was outside the allowed range.

当前属性格式不正确。The current attribute is ill-formed.

适用于