Click or drag to resize
StringFormat 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) Version: 4.0.0.0
Syntax
C#
public static string Format(
	string format,
	Object arg0,
	Object arg1,
	Object arg2
)

Parameters

format
Type: SystemString
A composite format string (see Remarks).
arg0
Type: SystemObject
The first object to format.
arg1
Type: SystemObject
The second object to format.
arg2
Type: SystemObject
The third object to format.

Return Value

Type: String
A copy of format in which the format items have been replaced by the string representations of arg0, arg1, and arg2.
Exceptions
ExceptionCondition
ArgumentNullExceptionformat is null.
FormatExceptionformat is invalid.-or- The index of a format item is less than zero, or greater than two.
See Also