String::Format Method (IFormatProvider, String, array<Object>)
Replaces the format items in a specified string with the string representations of corresponding objects in a specified array. A parameter supplies culture-specific formatting information.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
public: static String^ Format( IFormatProvider^ provider, String^ format, ... array<Object^>^ args )
Parameters
- provider
- Type: System::IFormatProvider
An object that supplies culture-specific formatting information.
- format
- Type: System::String
A composite format string.
- args
- Type: array<System::Object>
An object array that contains zero or more objects to format.
Return Value
Type: System::StringA copy of format in which the format items have been replaced by the string representation of the corresponding objects in args.
| Exception | Condition |
|---|---|
| ArgumentNullException | format or args is nullptr. |
| FormatException | format is invalid. -or- The index of a format item is less than zero, or greater than or equal to the length of the args array. |
Note |
|---|
For examples and comprehensive usage information about this and other overloads of the Format method, see the Format overload summary. |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note