Replaces all positional format placeholders in the current string with the string representation of
their corresponding object in the arguments array.
Declaration
public static string FormatWith(this string format, params object[] args)
Parameters
| Type |
Name |
Description |
| String |
format |
This composite format string instance. |
| Object[] |
args |
An object array with all formatting arguments. |
Returns
| Type |
Description |
| String |
A copy of the current format string instance that has all positional format
placeholders replaced by the string representations of their corresponding objects in the
args parameters array.
|
Exceptions
| Type |
Condition |
| ArgumentNullException |
The format or args parameter is null.
|
| FormatException |
The format of the current string is invalid; or the index of a positional format placeholder is negative
or greater than or equal to the length of the args parameter array.
|