条件表达式
switch (op.ToLower())
{
case "add":
return " + ";
case "bitwiseand":
return " & ";
case "bitwisenot":
return " ~ ";
case "bitwiseor":
return " | ";
case "bitwisexor":
return " ^ ";
case "divide":
return " / ";
case "equal":
return " = ";
case "greater":
return " > ";
case "greaterorequal":
return " >= ";
case "isnull":
return " is null ";
case "isnotnull":
return " is not null ";
case "less":
return " < ";
case "lessorequal":
return " <= ";
case "like":
return " like ";
case "startwith":
return " like ";
case "endwith":
return " like ";
case "modulo":
return " % ";
case "multiply":
return " * ";
case "notequal":
return " <> ";
case "subtract":
return " - ";
case "and":
return " and ";
case "or":
return " or ";
case "in":
return " in ";
case "notin":
return " not in ";
default:
return " = ";
转载于:https://www.cnblogs.com/daimaxuejia/p/6831299.html