mscorlib(4.0.0.0) API with additions
System.FormattableString Class Referenceabstract

Represents a composite format string, along with the arguments to be formatted. More...

Inheritance diagram for System.FormattableString:
[legend]
Collaboration diagram for System.FormattableString:
[legend]

Public Member Functions

abstract object [] GetArguments ()
 Returns an object array that contains one or more objects to format. More...
 
abstract object GetArgument (int index)
 Returns the argument at the specified index position. More...
 
abstract string ToString (IFormatProvider formatProvider)
 Returns the string that results from formatting the composite format string along with its arguments by using the formatting conventions of a specified culture. More...
 
override string ToString ()
 Returns the string that results from formatting the composite format string along with its arguments by using the formatting conventions of the current culture. More...
 

Static Public Member Functions

static string Invariant (FormattableString formattable)
 Returns a result string in which arguments are formatted by using the conventions of the invariant culture. More...
 

Protected Member Functions

 FormattableString ()
 Instantiates a new instance of the T:System.FormattableString class. More...
 

Properties

abstract string Format [get]
 Returns the composite format string. More...
 
abstract int ArgumentCount [get]
 Gets the number of arguments to be formatted. More...
 

Detailed Description

Represents a composite format string, along with the arguments to be formatted.

Definition at line 7 of file FormattableString.cs.

Constructor & Destructor Documentation

◆ FormattableString()

System.FormattableString.FormattableString ( )
protected

Instantiates a new instance of the T:System.FormattableString class.

Definition at line 79 of file FormattableString.cs.

Member Function Documentation

◆ GetArgument()

abstract object System.FormattableString.GetArgument ( int  index)
pure virtual

Returns the argument at the specified index position.

Parameters
indexThe index of the argument. Its value can range from zero to one less than the value of P:System.FormattableString.ArgumentCount.
Returns
The argument.

◆ GetArguments()

abstract object [] System.FormattableString.GetArguments ( )
pure virtual

Returns an object array that contains one or more objects to format.

Returns
An object array that contains one or more objects to format.

◆ Invariant()

static string System.FormattableString.Invariant ( FormattableString  formattable)
static

Returns a result string in which arguments are formatted by using the conventions of the invariant culture.

Parameters
formattableThe object to convert to a result string.
Returns
The string that results from formatting the current instance by using the conventions of the invariant culture.
Exceptions
T:System.ArgumentNullExceptionformattable is null.

Definition at line 60 of file FormattableString.cs.

◆ ToString() [1/2]

abstract string System.FormattableString.ToString ( IFormatProvider  formatProvider)
pure virtual

Returns the string that results from formatting the composite format string along with its arguments by using the formatting conventions of a specified culture.

Parameters
formatProviderAn object that provides culture-specific formatting information.
Returns
A result string formatted by using the conventions of formatProvider .

◆ ToString() [2/2]

override string System.FormattableString.ToString ( )

Returns the string that results from formatting the composite format string along with its arguments by using the formatting conventions of the current culture.

Returns
A result string formatted by using the conventions of the current culture.

Definition at line 72 of file FormattableString.cs.

Property Documentation

◆ ArgumentCount

abstract int System.FormattableString.ArgumentCount
get

Gets the number of arguments to be formatted.

Returns
The number of arguments to be formatted.

Definition at line 22 of file FormattableString.cs.

◆ Format

abstract string System.FormattableString.Format
get

Returns the composite format string.

Returns
The composite format string.

Definition at line 13 of file FormattableString.cs.


The documentation for this class was generated from the following file: