Skip to main content

Convert 'do' to 'while'

PropertyValue
IdRR0123
Applicable Syntaxdo statement
Syntax Spando keyword
Enabled by Default✓

Usage​

Example #1​

before.cs
do
{
} while (condition);
after.cs
while (condition)
{
}

Configuration​

roslynator_refactoring.convert_do_to_while.enabled = true|false