Code inspection: Use 'Array.Empty<T>()'
This inspection reports creation of an empty array that can be replaced with Array.Empty<T>(). This avoids repeated allocations and makes the intent explicit.
Example
var items = new int[0];
var items = Array.Empty<int>();
Quick-fix
Replace the empty array allocation with Array.Empty<T>().
29 March 2026