<div class="meta" robots="noindex">

</div>

Method

# Integer.ToText

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Integer.ToString<integer.tostring>` as a replacement.

</div>

## Description

Converts the Integer to a Text value using the specified locale and format.

## Notes

If no locale is specified, then Locale.Raw is used.

Refer to the [Unicode Technical Standard \#35, appendix G (Number Format Patterns)](http://unicode.org/reports/tr35/tr35-4.html#Number_Format_Patterns) for information on how to specify a format.

## Sample code

Convert an Integer value to Text:

``` xojo
Var i As Integer = 42
Var t As Text = "The number is " + i.ToText
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Add to an Integer directly and convert the new value:

``` xojo
Var n As Integer = 5
Var t As Text = Integer(n + 1).ToText ' t = "6"
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Formats the Integer value:

``` xojo
value = 1245
Var t As Text = value.ToText ' t = "1245"
t = value.ToText(Xojo.Core.Locale.Current, "#,###") ' t = "1,245"
```

## Compatibility

All project types on all supported operating systems.
