# RCS0041: Remove newline between 'if' keyword and 'else' keyword

| Property | Value      |
| -------- | ---------- |
| Id       | RCS0041    |
| Category | Formatting |
| Severity | None       |

## Example

### Code with Diagnostic

```csharp
if (x)
{
    Foo();
}
else // RCS0041
if (y)
{
    Bar();
}
```

### Code with Fix

```csharp
if (x)
{
    Foo();
}
else if (y)
{
    Bar();
}
```

## Applies to

* [Roslynator.Formatting.Analyzers](https://www.nuget.org/packages/Roslynator.Formatting.Analyzers)

## See Also

* [How to Suppress a Diagnostic](../HowToConfigureAnalyzers.md#how-to-suppress-a-diagnostic)


*\(Generated with [DotMarkdown](http://github.com/JosefPihrt/DotMarkdown)\)*