От: | karbofos42 | ||
Дата: | 21.11.24 07:53 | ||
Оценка: | +1 |
https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13#implicit-index-access
The implicit "from the end" index operator, ^, is now allowed in an object initializer expression.
...
The preceding example creates an array that counts down from 9 to 0. In versions before C# 13, the ^ operator can't be used in an object initializer. You need to index the elements from the front.