## DateTimeOffset::ToString() const method


将当前对象转换为字符串。

```cpp
String System::DateTimeOffset::ToString() const
```


### ReturnValue

[String](../../string/) representation of the current [DateTimeOffset](../) object.

## 另见

* Class [String](../../string/)
* Class [DateTimeOffset](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## DateTimeOffset::ToString(const SharedPtr\<IFormatProvider\>\&) const method


使用指定的格式提供程序，将当前对象转换为字符串。

```cpp
String System::DateTimeOffset::ToString(const SharedPtr<IFormatProvider> &provider) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| 提供程序 | const SharedPtr\<IFormatProvider\>\& | 格式提供程序。 |

### ReturnValue

[String](../../string/) representation of the current [DateTimeOffset](../) object.

## 另见

* Class [String](../../string/)
* Typedef [SharedPtr](../../sharedptr/)
* Class [IFormatProvider](../../iformatprovider/)
* Class [DateTimeOffset](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## DateTimeOffset::ToString(const String\&) const method


使用指定的格式，将当前对象转换为字符串。

```cpp
String System::DateTimeOffset::ToString(const String &format) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| 格式 | const String\& | 格式字符串。 |

### ReturnValue

[String](../../string/) representation of the current [DateTimeOffset](../) object.

## 另见

* Class [String](../../string/)
* Class [DateTimeOffset](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## DateTimeOffset::ToString(const String\&, const SharedPtr\<IFormatProvider\>\&) const method


使用指定的格式和格式提供程序，将当前对象转换为字符串。

```cpp
String System::DateTimeOffset::ToString(const String &format, const SharedPtr<IFormatProvider> &provider) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| 格式 | const String\& | 格式字符串。 |
| 提供程序 | const SharedPtr\<IFormatProvider\>\& | 格式提供程序。 |

### ReturnValue

[String](../../string/) representation of the current [DateTimeOffset](../) object.

## 另见

* Class [String](../../string/)
* Typedef [SharedPtr](../../sharedptr/)
* Class [IFormatProvider](../../iformatprovider/)
* Class [DateTimeOffset](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
