# IFormattingInfo

> Contains all necessary info for formatting a value

## Definition

* **Type:** Interface
* **Namespace:** [Unity.SmartStrings.Core.Extensions](/engine/6000.7/script-reference/unity/smartstrings/core/extensions.md)
* **Assembly:** UnityEngine.SmartStringsModule

```csharp
public interface IFormattingInfo
```

## Remarks

In "\{Items.Length:choose(1,2,3):one|two|three}", the [IFormattingInfo.CurrentValue](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/currentvalue.md) would be the value of "Items.Length", the [IFormattingInfo.FormatterOptions](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/formatteroptions.md) would be "1,2,3", and the [IFormattingInfo.Format](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/format.md) would be "one|two|three".

## Properties

| Property                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Alignment](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/alignment.md)               | Alignment inserts spaces into the output to ensure consistent length. Positive numbers insert spaces to the left, to right-align the text. Negative numbers insert spaces to the right, to left-align the text. This should only work with the Default Formatter, but is optional with custom formatters. This is primarily for compatibility with String.Format. |
| [CurrentValue](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/currentvalue.md)         | The current value that is to be formatted.                                                                                                                                                                                                                                                                                                                        |
| [Format](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/format.md)                     | This format specifies how to output the [IFormattingInfo.CurrentValue](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/currentvalue.md).                                                                                                                                                                                       |
| [FormatDetails](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/formatdetails.md)       | Infrequently used details, often used for debugging                                                                                                                                                                                                                                                                                                               |
| [FormatterOptions](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/formatteroptions.md) | When a named formatter is used, this will hold the options. For example, in "\{0:choose(1,2,3):one\|two\|three}", FormatterOptions is "1,2,3".                                                                                                                                                                                                                    |
| [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/placeholder.md)           | Contains all the details about the current placeholder.                                                                                                                                                                                                                                                                                                           |

## Methods

| Method                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FormatAsChild](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/formataschild.md)             | Creates a child [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) from the current [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) instance and invokes formatting with [SmartFormatter](/engine/6000.7/script-reference/unity/smartstrings/smartformatter.md) with the child as parameter. |
| [FormattingException](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/formattingexception.md) | Creates a [IFormattingInfo.FormattingException](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/formattingexception.md) associated with the [IFormattingInfo.Format](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/format.md).                                                                                                      |
| [Write](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo/write.md)                             | Writes a ReadOnlySpan\_1 text to the output.                                                                                                                                                                                                                                                                                                                                                                |
