﻿---
title: csharp_remove_blank_lines_near_braces_in_declarations
description: Force no blank line directly under a type/namespace's opening brace or above its closing one. Defaults to `true`
url: https://docs-v3-preview.elastic.dev/reference/blank-lines/csharp_remove_blank_lines_near_braces_in_declarations
---

# csharp_remove_blank_lines_near_braces_in_declarations
Force no blank line directly under a type/namespace's opening brace or above its closing one.

## Values


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

**Default:** `true`

## Conformance

No known case where Curb's output is not a fixed point of `dotnet format` — see [conformance](https://docs-v3-preview.elastic.dev/design-principles/conformance).

### `csharp_remove_blank_lines_near_braces_in_declarations = true`

```ini
csharp_remove_blank_lines_near_braces_in_declarations = true
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    namespace N;

    public class Widget
    {

        private int _x;

        public void Run()
        {

            int a = 1;
            Console.WriteLine(a);
        }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    namespace N;

    public class Widget
    {
        private int _x;

        public void Run()
        {
            int a = 1;
            Console.WriteLine(a);
        }
    }
    ```
  </tab-item>
</tab-set>


### `csharp_remove_blank_lines_near_braces_in_declarations = false`

```ini
csharp_remove_blank_lines_near_braces_in_declarations = false
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    namespace N;

    public class Widget
    {
        private int _x;

        public void Run()
        {
            int a = 1;
            Console.WriteLine(a);
        }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    namespace N;

    public class Widget
    {

        private int _x;

        public void Run()
        {
            int a = 1;
            Console.WriteLine(a);
        }
    }
    ```
  </tab-item>
</tab-set>