The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

String.Format Method (IFormatProvider, String, 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,
	params object[] args


Type: System.IFormatProvider

An object that supplies culture-specific formatting information.

Type: System.String

A .

Type: System.Object[]

An object array that contains zero or more objects to format.

Return Value

Type: System.String

A copy of format in which the format items have been replaced by the string representation of the corresponding objects in args.

Exception Condition

format or args is null.


format is invalid.


The index of a format item is less than zero, or greater than or equal to the length of the args array.


For examples and comprehensive usage information about this and other overloads of the Format method, see the Format overload summary.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft