StringBuilderAppendFormat Method (String, Object) |
Appends the string returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a single argument.
Namespace: System.TextAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public StringBuilder AppendFormat(
string format,
Object arg0
)
Parameters
- format
- Type: SystemString
A composite format string (see Remarks). - arg0
- Type: SystemObject
An object to format.
Return Value
Type:
StringBuilderA reference to this instance with
format appended. Each format item in
format is replaced by the string representation of
arg0.
Exceptions Exception | Condition |
---|
ArgumentNullException | format is null. |
FormatException | format is invalid. -or-The index of a format item is less than 0 (zero), or greater than or equal to 1. |
ArgumentOutOfRangeException | The length of the expanded string would exceed MaxCapacity. |
See Also