错误 CC1071:合约验证器调用的参数过于复杂.请简化
本文关键字:于复杂 复杂 参数 CC1071 验证 调用 错误 | 更新日期: 2023-09-27 18:35:03
任何想法是什么意思?调用如下所示:
Require.IsTrue(value == null || type.IsInstanceOfType(value),
"value",
"The specified value must be an instance of the specified type.");
上级:
[ContractArgumentValidator]
public static void IsTrue(
Boolean condition, String paramName, String message)
{
if(!condition)
{
throw new ArgumentException(message, paramName);
}
Contract.EndContractBlock();
}
不要在验证器的参数中使用 || 或 && 运算符。反编译不支持它。