/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/csharp/whats-new/tutorials/snippets/staticinterfaces/RepeatSequence.cs
12 строк
338 B
Genevieve Warren
Generic math docs (#30379)
03 авг 2022, 02:51
Не верифицирован
03 авг 2022, 02:51
183fd28
Код
Авторство
О чём код?
public struct RepeatSequence : IGetNext<RepeatSequence> { private const char Ch = 'A'; public string Text = new string(Ch, 1); public RepeatSequence() {} public static RepeatSequence operator ++(RepeatSequence other) => other with { Text = other.Text + Ch }; public override string ToString() => Text; }