﻿---
title: csharp_place_simple_declaration_blocks_on_single_line
description: Collapse a method, constructor, operator, destructor, local function or accessor body onto one line when it holds a single statement with no comment and the result fits. Defaults to `false`
url: https://docs-v3-preview.elastic.dev/reference/wrapping/csharp_place_simple_declaration_blocks_on_single_line
---

# csharp_place_simple_declaration_blocks_on_single_line
Collapse a method, constructor, operator, destructor, local function or accessor body onto one line when it holds a single statement with no comment and the result fits.

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

```ini
csharp_place_simple_declaration_blocks_on_single_line = true
```

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

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>

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

    public class Widget
    {
        public int Value { get; set; }

        public int Double() { return Value * 2; }
    }
    ```
  </tab-item>
</tab-set>


### `csharp_place_simple_declaration_blocks_on_single_line = false`

```ini
csharp_place_simple_declaration_blocks_on_single_line = false
```

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

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>

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

    public class Widget
    {
        public int Value { get; set; }

        public int Double()
        {
            return Value * 2;
        }
    }
    ```
  </tab-item>
</tab-set>