--- lang: ja-jp breaks: true --- # C# `.editorconfig` で ファイルスコープ `namespace` を設定する 2022-07-26 > File Scoped Namespaces > https://docs.microsoft.com/ja-jp/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces > 【C# 10.0】ファイル スコープ名前空間 (一斉置換設定) > https://ufcpp.net/blog/2021/11/fix-all-file-scoped-namespace/ ## `.editorconfig` ```jsonl= [*.{cs,vb}] csharp_style_namespace_declarations=file_scoped:suggestion ``` ## 範囲指定されたブロックからファイルへの 変更方法 ### `Alt` + `Shift` + `F10`  :::warning `Alt` + `Shift` + `F10` によるファイルスコープ名前空間への変更は、`.editorconfig`の設定を行わなくても使用できるが、クラスファイルを新規作成された場合はブロックスコープ名前空間になる。 ::: ## Visual Studioからの設定   ###### tags: `C#` `.editorconfig` `namespace`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up