16.12. Append and AppendFormat Methods of Class StringBuilder

Class StringBuilder provides 19 overloaded Append methods for appending values of various types to the end of a StringBuilder’s contents. There are versions of this method for each of the primitive types and for character arrays, Strings and Objects. Remember that method ToString produces a String representation of any Object, so any Object’s string representation can be appended to a StringBuilder. Each of the methods takes an argument, converts it to a String and appends it to the StringBuilder. Figure 16.11 demonstrates several Append methods.

Figure 16.11. Append methods of StringBuilder.
					1
					' Fig. 16.11: StringBuilderAppend.vb
					2
					' Demonstrating StringBuilder Append methods.
					

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.