Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​FormattableString
Assembly: System.Runtime
Inheritance: object → FormattableString
Represents a composite format string, along with the arguments to be formatted.
Properties
public
int
ArgumentCount
Gets the number of arguments to be formatted.
public
string
Format
Returns the composite format string.
Methods
public
object
GetArgument​(int index)
index
The index of the argument. Its value can range from zero to one less than the value of <see cref="P:System.FormattableString.ArgumentCount" /> .
Returns The argument.
Returns the argument at the specified index position.
public
object[]
GetArguments​() Returns An object array that contains one or more objects to format.
Returns an object array that contains one or more objects to format.
public
string
ToString​() Returns A result string formatted by using the conventions of the current culture.
Returns the string that results from formatting the composite format string along with its arguments by using the formatting conventions of the current culture.
public
string
ToString​(IFormatProvider formatProvider)
formatProvider
An object that provides culture-specific formatting information.
Returns A result string formatted by using the conventions of <paramref name="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.
public
bool
Equals​(object obj)
Inherited from object
obj
The object to compare with the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
Determines whether the specified object is equal to the current object.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
int
GetHashCode​()
Inherited from object
Returns A hash code for the current object.
Serves as the default hash function.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .