VerificationConditionalOperator VerificationConditionalOperator VerificationConditionalOperator VerificationConditionalOperator Enum

定义

指定 VerificationAttribute 类中使用的条件表达式的运算符。Specifies operators for a conditional expression used in a VerificationAttribute class.

public enum class VerificationConditionalOperator
public enum VerificationConditionalOperator
type VerificationConditionalOperator = 
Public Enum VerificationConditionalOperator
继承
VerificationConditionalOperatorVerificationConditionalOperatorVerificationConditionalOperatorVerificationConditionalOperator

字段

Equals Equals Equals Equals 0

等于运算符 (=)。The equal to operator (=).

NotEquals NotEquals NotEquals NotEquals 1

不等于运算符 (!=)。The not equal to operator (!=).

注解

使用扩展类、成员或索引器VerificationAttribute时, 可以使用条件表达式来定义验证辅助功能的方式。When using extending a class, member or indexer with a VerificationAttribute, you may use a conditional expression to define how accessibility is verified. 条件表达式的左侧是ConditionalProperty , 右侧ConditionalValue是。The left side of a conditional expression is the ConditionalProperty and the right side is the ConditionalValue. 使用 Equals 运算符时, 左侧必须等于条件表达式的右侧, 验证规则才能报告为 true。When the Equals operator is used, the left side must equal the right side of the conditional expression for the verification rule to report true. 使用 NotEquals 运算符时, 左侧不得等于条件表达式的右侧, 验证规则才能报告为 true。When the NotEquals operator is used, the left side must not equal to the right side of the conditional expression for the verification rule to report true.

适用于

另请参阅