我有这样的代码:
DataRow[] drClaimCPT;
drClaimCPT = dtCpt.Select("CLAIM_NUMBER == " + claimNo + "");
当我运行时,出现错误:
Syntax error: Missing operand before '=' operator.
我做错了什么?
最佳答案
如果type为整数,这应该对您有用:
drClaimCPT = dtCpt.Select("CLAIM_NUMBER = " + claimNo + "");
对于字符串:
drClaimCPT = dtCpt.Select("CLAIM_NUMBER = '" + claimNo + "'");
关于c# - 语法错误: Missing operand before '=' operator,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21749435/