Method ToString
ToString()
Returns the localized string representation of the currency containing the currency's name and currency code.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
ToString(string?, CultureInfo?)
Returns a localized string representation of the currency using the specified format and culture.
Declaration
public string ToString(string? format, CultureInfo? culture = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | format | Valid values are |
| CultureInfo | culture | The culture that should be used to localize the name of the currency (the current culture is used if this parameter is not provided. |
Returns
| Type | Description |
|---|---|
| string |
Exceptions
| Type | Condition |
|---|---|
| FormatException | Format string was invalid. |