比如:
CodeConditionStatement ep = new CodeConditionStatement();
ep.Condition = new CodeBinaryOperatorExpression(new CodePrimitiveExpression(null), CodeBinaryOperatorType.IdentityInequality, new CodeVariableReferenceExpression("i"));
// Add the WriteLine call to the statement collection.
start.Statements.Add(ep);