Code inspection: Use index from end expression
This inspection reports index expressions that count from the end by subtracting from Length or Count. When the index is really "N from the end", C# index-from-end syntax makes that intent clearer.
Example
var last = items[items.Length - 1];
var last = items[^1];
Quick-fix
The ^ syntax is shorter and immediately shows that the element is accessed relative to the end of the collection.
30 March 2026