Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 548 Bytes

RCS1239.md

File metadata and controls

36 lines (26 loc) · 548 Bytes

RCS1239: Use 'for' statement instead of 'while' statement

Property Value
Id RCS1239
Category Readability
Severity Info

Example

Code with Diagnostic

int i = 0;
while (x)
{
    M();
    i++;
}

Code with Fix

for (int i = 0; f; i++)
{
    M();
}

See Also

(Generated with DotMarkdown)