﻿---
title: csharp_place_simple_blocks_on_single_line
description: The same, for a lambda or anonymous method's block body. Defaults to `false`
url: https://docs-v3-preview.elastic.dev/reference/wrapping/csharp_place_simple_blocks_on_single_line
---

# csharp_place_simple_blocks_on_single_line
The same, for a lambda or anonymous method's block body.

## Values


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

**Default:** `false`

## 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_place_simple_blocks_on_single_line = true`

```ini
csharp_place_simple_blocks_on_single_line = true
```

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

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

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

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


### `csharp_place_simple_blocks_on_single_line = false`

```ini
csharp_place_simple_blocks_on_single_line = false
```

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

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

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

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