XmlConvert.ToString Method

Definition

Converts strongly typed data to an equivalent String representation.

Overloads

ToString(Single)

Converts the Single to a String.

ToString(TimeSpan)

Converts the TimeSpan to a String.

ToString(UInt16)

Converts the UInt16 to a String.

ToString(UInt32)

Converts the UInt32 to a String.

ToString(DateTimeOffset, String)

Converts the supplied DateTimeOffset to a String in the specified format.

ToString(DateTime, String)

Converts the DateTime to a String.

ToString(DateTime, XmlDateTimeSerializationMode)

Converts the DateTime to a String using the XmlDateTimeSerializationMode specified.

ToString(SByte)

Converts the SByte to a String.

ToString(UInt64)

Converts the UInt64 to a String.

ToString(Int64)

Converts the Int64 to a String.

ToString(Boolean)

Converts the Boolean to a String.

ToString(Int16)

Converts the Int16 to a String.

ToString(Guid)

Converts the Guid to a String.

ToString(Double)

Converts the Double to a String.

ToString(Decimal)

Converts the Decimal to a String.

ToString(DateTimeOffset)

Converts the supplied DateTimeOffset to a String.

ToString(DateTime)
Obsolete.
Obsolete.

Converts the DateTime to a String.

ToString(Char)

Converts the Char to a String.

ToString(Byte)

Converts the Byte to a String.

ToString(Int32)

Converts the Int32 to a String.

ToString(Single)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Single to a String.

C#
public static string ToString(float value);

Parameters

value
Single

The value to convert.

Returns

A string representation of the Single.

Remarks

If value is Single.PositiveInfinity or Single.NegativeInfinity, this method returns the string INF or -INF respectively.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(TimeSpan)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the TimeSpan to a String.

C#
public static string ToString(TimeSpan value);

Parameters

value
TimeSpan

The value to convert.

Returns

A string representation of the TimeSpan.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(UInt16)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Important

This API is not CLS-compliant.

Converts the UInt16 to a String.

C#
[System.CLSCompliant(false)]
public static string ToString(ushort value);

Parameters

value
UInt16

The value to convert.

Returns

A string representation of the UInt16.

Attributes

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(UInt32)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Important

This API is not CLS-compliant.

Converts the UInt32 to a String.

C#
[System.CLSCompliant(false)]
public static string ToString(uint value);

Parameters

value
UInt32

The value to convert.

Returns

A string representation of the UInt32.

Attributes

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(DateTimeOffset, String)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the supplied DateTimeOffset to a String in the specified format.

C#
public static string ToString(DateTimeOffset value, string format);

Parameters

value
DateTimeOffset

The DateTimeOffset to be converted.

format
String

The format to which s is converted. The format parameter can be any subset of the W3C Recommendation for the XML dateTime type. (For more information, see the dateTime section of the XML Schema specification..)

Returns

A String representation in the specified format of the supplied DateTimeOffset.

Examples

The following example converts a DateTimeOffset representation of the current time to a String in the specified format.

C#
using System;
using System.Xml;

class Example
{
    static void Main()
    {
        // Create the DateTimeOffset object and set the time to the current time.
        DateTimeOffset dto;
        dto = DateTimeOffset.Now;

        // Convert the DateTimeObject to a string in a specified format and display the result.
        // The specified format must be a subset of the W3C Recommendation for the XML dateTime type.
        String timeAsString = XmlConvert.ToString(dto, "yyyy-MM-ddTHH:mm:sszzzzzzz");
        Console.WriteLine(timeAsString);
    }
}

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(DateTime, String)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the DateTime to a String.

C#
public static string ToString(DateTime value, string format);

Parameters

value
DateTime

The value to convert.

format
String

The format structure that defines how to display the converted string. Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets.

Returns

A string representation of the DateTime in the specified format.

Examples

The following example, converts data types to string and then writes the information out to the console.

C#
using System;
using System.IO;
using System.Xml;

public class Sample
{
  public static void Main()
  {

    //Define the order data.  They will be converted to string
    //before being written out.
    Int16 custID = 32632;
    String orderID = "367A54";
    DateTime orderDate = new DateTime();
    orderDate = DateTime.Now;
    Double price = 19.95;

    //Create a writer that outputs to the console.
    XmlTextWriter writer = new XmlTextWriter (Console.Out);
    writer.Formatting = Formatting.Indented;

    //Write an element (this one is the root)
    writer.WriteStartElement("order");

    //Write the order date.
    writer.WriteAttributeString("date", XmlConvert.ToString(orderDate, "yyyy-MM-dd"));

    //Write the order time.
    writer.WriteAttributeString("time", XmlConvert.ToString(orderDate, "HH:mm:ss"));

    //Write the order data.
    writer.WriteElementString("orderID", orderID);
    writer.WriteElementString("custID", XmlConvert.ToString(custID));
    writer.WriteElementString("price", XmlConvert.ToString(price));

    //Write the close tag for the root element
    writer.WriteEndElement();

    //Write the XML and close the writer
    writer.Close();
  }
}

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

ToString(DateTime, XmlDateTimeSerializationMode)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the DateTime to a String using the XmlDateTimeSerializationMode specified.

C#
public static string ToString(DateTime value, System.Xml.XmlDateTimeSerializationMode dateTimeOption);

Parameters

value
DateTime

The DateTime value to convert.

dateTimeOption
XmlDateTimeSerializationMode

One of the XmlDateTimeSerializationMode values that specify how to treat the DateTime value.

Returns

A String equivalent of the DateTime.

Exceptions

The dateTimeOption value is not valid.

The value or dateTimeOption value is null.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(SByte)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Important

This API is not CLS-compliant.

Converts the SByte to a String.

C#
[System.CLSCompliant(false)]
public static string ToString(sbyte value);

Parameters

value
SByte

The value to convert.

Returns

A string representation of the SByte.

Attributes

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(UInt64)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Important

This API is not CLS-compliant.

Converts the UInt64 to a String.

C#
[System.CLSCompliant(false)]
public static string ToString(ulong value);

Parameters

value
UInt64

The value to convert.

Returns

A string representation of the UInt64.

Attributes

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Int64)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Int64 to a String.

C#
public static string ToString(long value);

Parameters

value
Int64

The value to convert.

Returns

A string representation of the Int64.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Boolean)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Boolean to a String.

C#
public static string ToString(bool value);

Parameters

value
Boolean

The value to convert.

Returns

A string representation of the Boolean, that is, "true" or "false".

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Int16)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Int16 to a String.

C#
public static string ToString(short value);

Parameters

value
Int16

The value to convert.

Returns

A string representation of the Int16.

Examples

The following example, converts data types to string and then writes the information out to the console.

C#
using System;
using System.IO;
using System.Xml;

public class Sample
{
  public static void Main()
  {

    //Define the order data.  They will be converted to string
    //before being written out.
    Int16 custID = 32632;
    String orderID = "367A54";
    DateTime orderDate = new DateTime();
    orderDate = DateTime.Now;
    Double price = 19.95;

    //Create a writer that outputs to the console.
    XmlTextWriter writer = new XmlTextWriter (Console.Out);
    writer.Formatting = Formatting.Indented;

    //Write an element (this one is the root)
    writer.WriteStartElement("order");

    //Write the order date.
    writer.WriteAttributeString("date", XmlConvert.ToString(orderDate, "yyyy-MM-dd"));

    //Write the order time.
    writer.WriteAttributeString("time", XmlConvert.ToString(orderDate, "HH:mm:ss"));

    //Write the order data.
    writer.WriteElementString("orderID", orderID);
    writer.WriteElementString("custID", XmlConvert.ToString(custID));
    writer.WriteElementString("price", XmlConvert.ToString(price));

    //Write the close tag for the root element
    writer.WriteEndElement();

    //Write the XML and close the writer
    writer.Close();
  }
}

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Guid)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Guid to a String.

C#
public static string ToString(Guid value);

Parameters

value
Guid

The value to convert.

Returns

A string representation of the Guid.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Double)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Double to a String.

C#
public static string ToString(double value);

Parameters

value
Double

The value to convert.

Returns

A string representation of the Double.

Examples

The following example, converts data types to string and then writes the information out to the console.

C#
using System;
using System.IO;
using System.Xml;

public class Sample
{
  public static void Main()
  {

    //Define the order data.  They will be converted to string
    //before being written out.
    Int16 custID = 32632;
    String orderID = "367A54";
    DateTime orderDate = new DateTime();
    orderDate = DateTime.Now;
    Double price = 19.95;

    //Create a writer that outputs to the console.
    XmlTextWriter writer = new XmlTextWriter (Console.Out);
    writer.Formatting = Formatting.Indented;

    //Write an element (this one is the root)
    writer.WriteStartElement("order");

    //Write the order date.
    writer.WriteAttributeString("date", XmlConvert.ToString(orderDate, "yyyy-MM-dd"));

    //Write the order time.
    writer.WriteAttributeString("time", XmlConvert.ToString(orderDate, "HH:mm:ss"));

    //Write the order data.
    writer.WriteElementString("orderID", orderID);
    writer.WriteElementString("custID", XmlConvert.ToString(custID));
    writer.WriteElementString("price", XmlConvert.ToString(price));

    //Write the close tag for the root element
    writer.WriteEndElement();

    //Write the XML and close the writer
    writer.Close();
  }
}

Remarks

If value is Double.PositiveInfinity or Double.NegativeInfinity, this method returns the string INF or -INF respectively.

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Decimal)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Decimal to a String.

C#
public static string ToString(decimal value);

Parameters

value
Decimal

The value to convert.

Returns

A string representation of the Decimal.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(DateTimeOffset)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the supplied DateTimeOffset to a String.

C#
public static string ToString(DateTimeOffset value);

Parameters

value
DateTimeOffset

The DateTimeOffset to be converted.

Returns

A String representation of the supplied DateTimeOffset.

Examples

The following example converts a DateTimeOffset representation of the current time to a String.

C#
using System;
using System.Xml;

class Example
{
    static void Main()
    {
        // Create the DateTimeOffset object and set the time to the current time
        DateTimeOffset dto;
        dto = DateTimeOffset.Now;

        // Convert the DateTimeOffset object to a string and display the result
        string timeAsString = XmlConvert.ToString(dto);
        Console.WriteLine(timeAsString);
    }
}

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(DateTime)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Caution

Use XmlConvert.ToString() that takes in XmlDateTimeSerializationMode

Caution

Use XmlConvert.ToString() that accepts an XmlDateTimeSerializationMode instead.

Converts the DateTime to a String.

C#
[System.Obsolete("Use XmlConvert.ToString() that takes in XmlDateTimeSerializationMode")]
public static string ToString(DateTime value);
C#
[System.Obsolete("Use XmlConvert.ToString() that accepts an XmlDateTimeSerializationMode instead.")]
public static string ToString(DateTime value);
C#
public static string ToString(DateTime value);

Parameters

value
DateTime

The value to convert.

Returns

A string representation of the DateTime in the format yyyy-MM-ddTHH:mm:ss where 'T' is a constant literal.

Attributes

Remarks

Note

The XmlConvert.ToString(DateTime) method is obsolete in the 2.0 version of the .NET Framework and has been replaced with the XmlConvert.ToString(DateTime, XmlDateTimeSerializationMode) method. The suggested mode is RoundtripKind. If an exact match is expected, please use XmlConvert.ToString(DateTime, String) with the format string yyyy-MM-ddTHH:mm:ss.fffffffzzzzzz.

Applies to

.NET 9 and other versions
Product Versions (Obsolete)
.NET (Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
.NET Standard (2.0, 2.1)

ToString(Char)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Char to a String.

C#
public static string ToString(char value);

Parameters

value
Char

The value to convert.

Returns

A string representation of the Char.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Byte)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Byte to a String.

C#
public static string ToString(byte value);

Parameters

value
Byte

The value to convert.

Returns

A string representation of the Byte.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

ToString(Int32)

Source:
XmlConvert.cs
Source:
XmlConvert.cs
Source:
XmlConvert.cs

Converts the Int32 to a String.

C#
public static string ToString(int value);

Parameters

value
Int32

The value to convert.

Returns

A string representation of the Int32.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0