NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

StringBuilder.AppendFormat

This method replaces zero or more format specifications with the appropriately formatted value of an object.

Overload List

This method replaces zero or more format specifications with the appropriately formatted value of an object.

[Visual Basic] 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;

This method replaces zero or more format specifications with the appropriately formatted value of an object.

[Visual Basic] 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;

This method replaces zero or more format specifications with the appropriately formatted value of an object.

[Visual Basic] 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;

This method replaces zero or more format specifications with the appropriately formatted value of an object.

[Visual Basic] 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;

This method replaces zero or more format specifications with the appropriately formatted value of an object.

[Visual Basic] Overloads Public Function AppendFormat(String, Object, Object, Object, Object) As StringBuilder
[C#] public StringBuilder AppendFormat(String, Object, Object, Object, Object);
[C++] public: StringBuilder* AppendFormat(String*, Object, Object, Object, Object);
[JScript] public function AppendFormat(String, Object, Object, Object, Object) : StringBuilder;

This method replaces zero or more format specifications with the appropriately formatted value of an object.

[Visual Basic] Overloads Public Function AppendFormat(String, Object(), IServiceObjectProvider) As StringBuilder
[C#] public StringBuilder AppendFormat(String, Object[], IServiceObjectProvider);
[C++] public: StringBuilder* AppendFormat(String*, Object[], IServiceObjectProvider);
[JScript] public function AppendFormat(String, Object[], IServiceObjectProvider) : StringBuilder;

Example

If the string assigned to format is "Thank you for your purchase of {0:####} copies of Better Basket Weaving." and arg[0] is an Int16 with the value 123, then the return value will be "Thank you for your purchase of 123 copies of Better Basket Weaving."

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

See Also

StringBuilder Class | StringBuilder Members | System.Text Namespace