﻿---
title: csharp_indent_block_contents
description: Indent statements inside a block. Defaults to `true`
url: https://docs-v3-preview.elastic.dev/reference/indentation/csharp_indent_block_contents
---

# csharp_indent_block_contents
Indent statements inside a block.

## Values


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

**Default:** `true`

### `csharp_indent_block_contents = true`

```ini
csharp_indent_block_contents = true
```

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

    public class Widget
    {
        public void Run()
        {
    int x = 1;
    int y = 2;
    Console.WriteLine(x + y);
        }
    }
    ```
  </tab-item>

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

    public class Widget
    {
        public void Run()
        {
            int x = 1;
            int y = 2;
            Console.WriteLine(x + y);
        }
    }
    ```
  </tab-item>
</tab-set>


### `csharp_indent_block_contents = false`

```ini
csharp_indent_block_contents = false
```

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

    public class Widget
    {
        public void Run()
        {
            int x = 1;
            int y = 2;
            Console.WriteLine(x + y);
        }
    }
    ```
  </tab-item>

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

    public class Widget
    {
        public void Run()
        {
        int x = 1;
        int y = 2;
        Console.WriteLine(x + y);
        }
    }
    ```
  </tab-item>
</tab-set>