﻿---
title: csharp_using_directive_placement
description: Move using directives inside or outside the namespace. IDE0065. Defaults to `(as written)`
url: https://docs-v3-preview.elastic.dev/reference/usings/csharp_using_directive_placement
---

# csharp_using_directive_placement
Move using directives inside or outside the namespace. IDE0065.

## Values


| Value               | Notes |
|---------------------|-------|
| `inside_namespace`  |       |
| `outside_namespace` |       |

**Default:** `(as written)`

### `csharp_using_directive_placement = inside_namespace`

```ini
csharp_using_directive_placement = inside_namespace
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    using System;
    using System.Collections.Generic;

    namespace N
    {
        public class Widget { }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    namespace N
    {
        using System;
        using System.Collections.Generic;

        public class Widget { }
    }
    ```
  </tab-item>
</tab-set>


### `csharp_using_directive_placement = outside_namespace`

```ini
csharp_using_directive_placement = outside_namespace
```

<tab-set>
  <tab-item title="Before">
    ```csharp
    using System;
    using System.Collections.Generic;

    namespace N
    {
        public class Widget { }
    }
    ```
  </tab-item>

  <tab-item title="After">
    ```csharp
    using System;
    using System.Collections.Generic;

    namespace N
    {
        public class Widget { }
    }
    ```
  </tab-item>
</tab-set>