S
simonZ
I have Function with string parameteres:
public string newLine(String string1,String string2,String string3){
StringBuilder webLine = new StringBuilder();
webLine.Append("<tD nowrap>" + string1 + "</td><td nowrap>" +
formatR(string2, 2) + "</tD><td nowrap>" + string3 + "</td><td>")
return webLine.ToString();
}
Is this ok or is better to work like that:
public string newLine(String string1,String string2,String string3){
StringBuilder webLine = new StringBuilder();
webLine.Append("<tD nowrap>");
webLine.Append(string1);
webLine.Append("</td><td nowrap>");
webLine.Append(formatR(string2, 2));
webLine.Append("</tD><td nowrap>");
webLine.Append(string3);
webLine.Append("</td><td>");
return webLine.ToString();
}
What is the most performance way to work with string builder?
Regards,S
public string newLine(String string1,String string2,String string3){
StringBuilder webLine = new StringBuilder();
webLine.Append("<tD nowrap>" + string1 + "</td><td nowrap>" +
formatR(string2, 2) + "</tD><td nowrap>" + string3 + "</td><td>")
return webLine.ToString();
}
Is this ok or is better to work like that:
public string newLine(String string1,String string2,String string3){
StringBuilder webLine = new StringBuilder();
webLine.Append("<tD nowrap>");
webLine.Append(string1);
webLine.Append("</td><td nowrap>");
webLine.Append(formatR(string2, 2));
webLine.Append("</tD><td nowrap>");
webLine.Append(string3);
webLine.Append("</td><td>");
return webLine.ToString();
}
What is the most performance way to work with string builder?
Regards,S