---
title: ToString
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/discretetimeinterval/tostring
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/discretetimeinterval/tostring.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:34:37.422Z
locale: en-us
---

# ToString

> Converts the interval to a string.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

## ToString()

Converts the interval to a string.

```csharp
public override string ToString()
```

### Returns

| Type                                                           | Description                                                                                                                                                                                                                                    |
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | A string that lists [DiscreteTimeInterval.Start](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/start.md) and [DiscreteTimeInterval.End](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/end.md). |

## ToString(string, IFormatProvider)

Converts the interval to a string, using a format and culture-specific format information.

```csharp
public string ToString(string format, IFormatProvider formatProvider)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The format string to apply to [DiscreteTimeInterval.Start](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/start.md) and [DiscreteTimeInterval.End](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/end.md).**** (\[IFormatProvider]\(https\://learn.microsoft.com/dotnet/api/system.iformatprovider)): The object that provides culture-specific formatting information.

### Returns

| Type                                                           | Description                                                                                                                                                                                                                                                                  |
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | A string that lists [DiscreteTimeInterval.Start](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/start.md) and [DiscreteTimeInterval.End](/engine/7000.0/script-reference/unity/animations/discretetimeinterval/end.md), each formatted with `format`. |
