StringBuilder.Append
using System;
using System.Text;
class Test {
public static void Main() {
StringBuilder myStringBuilder = new StringBuilder();
string myString = "www.java2s.com";
myStringBuilder.Append(myString);
myStringBuilder.Append(", www.java2s.com... ");
int myInt = 1234;
myStringBuilder.Append(myInt);
bool myBool = true;
myStringBuilder.Append(myBool);
myStringBuilder.Append('z', 5);
myStringBuilder.Append("Here's another string", 0, 4);
Console.WriteLine("myStringBuilder = " + myStringBuilder);
}
}
Related examples in the same category