> For the complete documentation index, see [llms.txt](https://andreyakinshin.gitbook.io/problembookdotnet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andreyakinshin.gitbook.io/problembookdotnet/ru/strings/corruptednumber-s.md).

# «CorruptedNumber» (Решение)

## Ответ

Задание можно выполнить с использованием пользовательской локали:

```csharp
var culture = (CultureInfo) CultureInfo.InvariantCulture.Clone();
culture.NumberFormat.NegativeSign = "Foo";
Thread.CurrentThread.CurrentCulture = culture;
Console.WriteLine(-42); // Displays "Foo42"
```

[Задача](/problembookdotnet/ru/strings/corruptednumber-p.md)
