Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Format

Replaces the format items in the specified format string with the string representation or the corresponding object.
Read time 2 minutesLast updated 8 days ago

Definition

Format(string, Object[])

Replaces the format items in the specified format string with the string representation or the corresponding object.
public static string Format(string format, params object[] args)

Parameters

format

A composite format string.

The objects to format.

Returns

Type

Description

stringThe format items in the specified format string replaced with the string representation or the corresponding object.

Remarks

Use Smart.Default or SmartFormatter for more
Format(...)
overloads.

Format(IFormatProvider, string, Object[])

Replaces the format items in the specified format string with the string representation or the corresponding object.
public static string Format(IFormatProvider provider, string format, params object[] args)

Parameters

The IFormatProvider to use.

format

A composite format string.

The objects to format.

Returns

Type

Description

stringThe format items in the specified format string replaced with the string representation or the corresponding object.

Remarks

Use Smart.Default or SmartFormatter for more
Format(...)
overloads.

Format(string, Object, Object, Object)

Replaces the format items in the specified format string with the string representation or the corresponding object.
public static string Format(string format, object arg0, object arg1, object arg2)

Parameters

format

A composite format string.

arg0

The first object to format.

arg1

The second object to format.

arg2

The third object to format.

Returns

Type

Description

stringThe format items in the specified format string replaced with the string representation or the corresponding object.

Remarks

Use Smart.Default or SmartFormatter for more
Format(...)
overloads.

Format(string, Object, Object)

Replaces the format items in the specified format string with the string representation or the corresponding object.
public static string Format(string format, object arg0, object arg1)

Parameters

format

A composite format string.

arg0

The first object to format.

arg1

The second object to format.

Returns

Type

Description

stringThe format items in the specified format string replaced with the string representation or the corresponding object.

Remarks

Use Smart.Default or SmartFormatter for more
Format(...)
overloads.

Format(string, Object)

Replaces the format items in the specified format string with the string representation or the corresponding object.
public static string Format(string format, object arg0)

Parameters

format

A composite format string.

arg0

The object to format.

Returns

Type

Description

stringThe format items in the specified format string replaced with the string representation or the corresponding object.

Remarks

Use Smart.Default or SmartFormatter for more
Format(...)
overloads.