public override string ToString() { var sb = new StringBuilder(); sb.Append($"if {Condition.ToString()} {Consequence.ToString()}"); if (Alternative != null) { sb.Append($" else {Alternative.ToString()}"); } return(sb.ToString()); }
public override string ToString() { var sb = new StringBuilder(); sb.Append("if") .Append(Condition.ToString()) .Append(" ") .Append(Consequence.ToString()); if (Alternative != null) { sb.Append("else") .Append(Alternative.ToString()); } return(sb.ToString()); }
public override string ToString() { var output = new StringBuilder(); output.Append("if"); output.Append(" "); output.Append(Condition.ToString()); output.Append("\n"); output.Append(Consequence.ToString()); if (Alternative != null) { output.Append("\n"); output.Append("else\n"); output.Append(Alternative.ToString()); } output.Append("\nend"); return(output.ToString()); }
public string ToString() { return("Trigger: " + Trigger.ToString() + "\n" + "Consequence: " + Consequence.ToString() + "\n" + "Children: " + Children.Count.ToString()); }