文档

Unity Engine

Unity Engine

Format

Replaces the format items in the specified format string with the string representation or the corresponding object.
阅读时间2 分钟最后更新于 1 个月前

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.