﻿---
title: csharp_keep_existing_linebreaks
description: Preservation mode. Defaults to true when max_line_length is off. Defaults to `(derived from max_line_length)`
url: https://docs-v3-preview.elastic.dev/reference/wrapping/csharp_keep_existing_linebreaks
---

# csharp_keep_existing_linebreaks
Preservation mode. Defaults to true when max_line_length is off.

## Values


| Value   | Notes |
|---------|-------|
| `true`  |       |
| `false` |       |

**Default:** `(derived from max_line_length)`

### `csharp_keep_existing_linebreaks = true`

```ini
csharp_keep_existing_linebreaks = true
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    using System.Text;

    namespace N;

    public class Widget
    {
        public string Build()
        {
            return new StringBuilder().Append("Hello").Append(", ").Append("World").Append("!").ToString();
        }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    using System.Text;

    namespace N;

    public class Widget
    {
        public string Build()
        {
            return new StringBuilder().Append("Hello").Append(", ").Append("World").Append("!").ToString();
        }
    }
    ```
  </tab-item>
</tab-set>


### `csharp_keep_existing_linebreaks = false`

```ini
csharp_keep_existing_linebreaks = false
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    using System.Text;

    namespace N;

    public class Widget
    {
        public string Build()
        {
            return new StringBuilder().Append("Hello").Append(", ").Append("World").Append("!").ToString();
        }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    using System.Text;

    namespace N;

    public class Widget
    {
        public string Build()
        {
            return new StringBuilder().Append("Hello").Append(", ").Append("World").Append("!").ToString();
        }
    }
    ```
  </tab-item>
</tab-set>