Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Format

Replaces one or more format items in a specified string with the string representation of a specific object.
Read time 3 minutesLast updated 6 days ago

Definition

Format(string, Object[])

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(string format, params object[] args)

Parameters

format

A composite format string.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(string, IList<Object>)

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(string format, IList<object> args)

Parameters

format

A composite format string.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(IFormatProvider, string, Object[])

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, string format, params object[] args)

Parameters

The IFormatProvider to use.

format

A composite format string.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(IFormatProvider, string, IList<Object>)

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, string format, IList<object> args)

Parameters

The IFormatProvider to use.

format

A composite format string.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(Format, Object[])

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(Format formatParsed, params object[] args)

Parameters

formatParsed

An instance of Format that was returned by Parser.ParseFormat.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(Format, IList<Object>)

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(Format formatParsed, IList<object> args)

Parameters

formatParsed

An instance of Format that was returned by Parser.ParseFormat.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(IFormatProvider, Format, Object[])

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, Format formatParsed, params object[] args)

Parameters

The IFormatProvider to use.

formatParsed

An instance of Format that was returned by Parser.ParseFormat.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(IFormatProvider, Format, IList<Object>)

Replaces one or more format items in a specified string with the string representation of a specific object.
public string Format(IFormatProvider provider, Format formatParsed, IList<object> args)

Parameters

The IFormatProvider to use.

formatParsed

An instance of Format that was returned by Parser.ParseFormat.

The object to format.

Returns

Type

Description

stringReturns the formatted input with items replaced with their string representation.

Format(FormattingInfo)

Formats the specified FormattingInfo.
public virtual void Format(FormattingInfo formattingInfo)

Parameters

formattingInfo

Formatting context to process.