Convert 'while' statement to 'do' statement
| Property | Value |
|---|---|
| Id | RR0150 |
| Applicable Syntax | while statement |
| Syntax Span | while keyword |
| Enabled by Default | ✓ |
Usage
Example #1
before.cs
while (condition)
{
}
after.cs
if (condition)
{
do
{
} while (condition);
}
Configuration
roslynator_refactoring.convert_while_to_do.enabled = true|false