Simply awesomeThe #1 ASP/ASP.NET Developer Community

StringBuilder.AppendFormat Method

System.Text Namespace   StringBuilder Class


Appends a formatted string, which contains zero or more format specifications, to this instance. Each format specification is replaced by the string representation of a corresponding object argument.

Overload List

1. Appends a formatted string, which contains zero or more format specifications, to this instance. Each format specification is replaced by the string representation of a corresponding object argument.

[ VB ] Overloads Public Function AppendFormat ( String, Object ) As StringBuilder

[ C# ] public StringBuilder AppendFormat ( string, object );

[ C++ ] public: StringBuilder* AppendFormat ( String*, Object* );

[ JScript ] public function AppendFormat ( String, Object ) : StringBuilder;

2. Appends a formatted string, which contains zero or more format specifications, to this instance. Each format specification is replaced by the string representation of a corresponding object argument.

[ VB ] Overloads Public Function AppendFormat ( String, ParamArray Object ( ) ) As StringBuilder

[ C# ] public StringBuilder AppendFormat ( string, params object [ ] );

[ C++ ] public: StringBuilder* AppendFormat ( String*, Object [ ] );

[ JScript ] public function AppendFormat ( String, Object [ ] ) : StringBuilder;

3. Appends a formatted string, which contains zero or more format specifications, to this instance. Each format specification is replaced by the string representation of a corresponding object argument.

[ VB ] Overloads Public Function AppendFormat ( IFormatProvider, String, ParamArray Object ( ) ) As StringBuilder

[ C# ] public StringBuilder AppendFormat ( IFormatProvider, string, params object [ ] );

[ C++ ] public: StringBuilder* AppendFormat ( IFormatProvider*, String*, Object [ ] );

[ JScript ] public function AppendFormat ( IFormatProvider, String, Object [ ] ) : StringBuilder;

4. Appends a formatted string, which contains zero or more format specifications, to this instance. Each format specification is replaced by the string representation of a corresponding object argument.

[ VB ] Overloads Public Function AppendFormat ( String, Object, Object ) As StringBuilder

[ C# ] public StringBuilder AppendFormat ( string, object, object );

[ C++ ] public: StringBuilder* AppendFormat ( String*, Object*, Object* );

[ JScript ] public function AppendFormat ( String, Object, Object ) : StringBuilder;

5. Appends a formatted string, which contains zero or more format specifications, to this instance. Each format specification is replaced by the string representation of a corresponding object argument.

[ VB ] Overloads Public Function AppendFormat ( String, Object, Object, Object ) As StringBuilder

[ C# ] public StringBuilder AppendFormat ( string, object, object, object );

[ C++ ] public: StringBuilder* AppendFormat ( String*, Object*, Object*, Object* );

[ JScript ] public function AppendFormat ( String, Object, Object, Object ) : StringBuilder;

Example

If the string assigned to format is "Thank you for your purchase of {0:####} copies of Microsoft® .NET ( Core Reference )." and arg is an Int16 with the value 123, then the return value will be "Thank you for your purchase of 123 copies of Microsoft® .NET ( Core Reference )."

If the string assigned to format is "Brad's dog has {0,-8:G} fleas." and arg is an Int16 with the value 42, then the return value will be "Brad's dog has 42 fleas."

See Also

StringBuilder Members


Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note