## Decimal::Parse(const String\&) method


将十进制数字的字符串表示转换为等效的 [Decimal](../) 类实例。

```cpp
static Decimal System::Decimal::Parse(const String &s)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| s | const String\& | 数字的字符串表示 |

### ReturnValue

一个新的 [Decimal](../) 类实例，表示与指定字符串所表示的值等价的值。

## 另见

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


使用指定的格式提供程序，将十进制数字的字符串表示转换为等效的 [Decimal](../) 类实例。

```cpp
static Decimal System::Decimal::Parse(const String &s, const SharedPtr<IFormatProvider> &provider)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| s | const String\& | 要转换的十进制值的字符串表示 |
| 提供程序 | const SharedPtr\<IFormatProvider\>\& | 格式提供程序 |

### ReturnValue

一个新的 [Decimal](../) 类实例，表示与指定字符串所表示的值等价的值

## 另见

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


使用指定的样式，将十进制数的字符串表示转换为等价的 [Decimal](../) 类实例。

```cpp
static Decimal System::Decimal::Parse(const String &s, Globalization::NumberStyles styles)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| s | const String\& | 要转换的十进制值的字符串表示 |
| styles | Globalization::NumberStyles | 一个枚举值的按位组合，提供关于 **s** 的附加信息、关于 **s** 中可能出现的样式元素的信息，或关于从 **s** 到 [Decimal](../) 对象的转换信息 |

### ReturnValue

一个新的 [Decimal](../) 类实例，表示与指定字符串所表示的值等价的值

## 另见

* Class [Decimal](../)
* Class [String](../../string/)
* Enum [NumberStyles](../../../system.globalization/numberstyles/)
* Class [Decimal](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
## Decimal::Parse(const String\&, Globalization::NumberStyles, const SharedPtr\<IFormatProvider\>\&) method


使用指定的样式和格式提供程序，将十进制数的字符串表示转换为等价的 [Decimal](../) 类实例。

```cpp
static Decimal System::Decimal::Parse(const String &s, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider> &provider)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| s | const String\& | 要转换的十进制值的字符串表示 |
| styles | Globalization::NumberStyles | 一个枚举值的按位组合，提供关于 **s** 的附加信息、关于 **s** 中可能出现的样式元素的信息，或关于从 **s** 到 [Decimal](../) 对象的转换信息 |
| 提供程序 | const SharedPtr\<IFormatProvider\>\& | 格式提供程序 |

### ReturnValue

一个新的 [Decimal](../) 类实例，表示与指定字符串所表示的值等价的值

## 另见

* Class [Decimal](../)
* Class [String](../../string/)
* Enum [NumberStyles](../../../system.globalization/numberstyles/)
* Typedef [SharedPtr](../../sharedptr/)
* Class [IFormatProvider](../../iformatprovider/)
* Class [Decimal](../)
* Namespace [System](../../)
* Library [Aspose.Font for C++](../../../)
