Format Method (String, Object, Object, Object)

String.Format Method (String, Object, Object, Object)

 

Replaces the format items in a specified string with the string representation of three specified objects.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public static string Format(
	string format,
	object arg0,
	object arg1,
	object arg2
)

Parameters

format
Type: System.String

A composite format string.

arg0
Type: System.Object

The first object to format.

arg1
Type: System.Object

The second object to format.

arg2
Type: System.Object

The third object to format.

Return Value

Type: System.String

A copy of format in which the format items have been replaced by the string representations of arg0, arg1, and arg2.

Exception Condition
ArgumentNullException

format is null.

FormatException

format is invalid.

-or-

The index of a format item is less than zero, or greater than two.

System_CAPS_noteNote

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 10
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft