﻿---
title: csharp_space_after_semicolon_in_for_statement
description: Space after a semicolon in a for statement. Defaults to `true`
url: https://docs-v3-preview.elastic.dev/reference/spacing/csharp_space_after_semicolon_in_for_statement
---

# csharp_space_after_semicolon_in_for_statement
Space after a semicolon in a for statement.

## Values


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

**Default:** `true`

### `csharp_space_after_semicolon_in_for_statement = true`

```ini
csharp_space_after_semicolon_in_for_statement = true
```

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

    public class Widget
    {
        public int Sum(int n)
        {
            int total = 0;
            for (int i = 0;i < n;i++)
                total += i;
            return total;
        }
    }
    ```
  </tab-item>

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

    public class Widget
    {
        public int Sum(int n)
        {
            int total = 0;
            for (int i = 0; i < n; i++)
                total += i;
            return total;
        }
    }
    ```
  </tab-item>
</tab-set>


### `csharp_space_after_semicolon_in_for_statement = false`

```ini
csharp_space_after_semicolon_in_for_statement = false
```

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

    public class Widget
    {
        public int Sum(int n)
        {
            int total = 0;
            for (int i = 0; i < n; i++)
                total += i;
            return total;
        }
    }
    ```
  </tab-item>

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

    public class Widget
    {
        public int Sum(int n)
        {
            int total = 0;
            for (int i = 0;i < n;i++)
                total += i;
            return total;
        }
    }
    ```
  </tab-item>
</tab-set>