ReSharper 2026.1 Help

Code inspection: 'true' is redundant as 'for'-statement condition

This inspection reports a for loop condition that is literally true. In a for loop, that condition is redundant and can be removed to use the standard infinite-loop form.

Example

for (; true; ) { Work(); }
for (;;) { Work(); }

Quick-fix

The quick-fix removes the true literal from the for loop condition.

13 April 2026