0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Visual Studio C# の自動コード成形と同じ行にかっこを付ける設定

0
Posted at

普段は他の言語をやっていて、久々に C# をやるとかっこで改行されるのが気になります。同じ行にかっこを付ける方法を紹介します。


【左】次の行にかっこ(デフォルト) 【右】同じ行にかっこ

自動コード成形

Visual Studio でもコード成形ができます。 CtrlK CtrlD です。2回押すことに注意です。

同じ行にかっこ

オプションで設定があります。

ツール 
オプション
テキストエディター 
C# 
コードスタイル 
書式設定 
改行

注意点

個人開発では問題ないですが、チームで開発するときはチーム全員が設定する必要があります。みんなが「同じ行かっこ」を使い出すともしかしたら Microsoft 側がデフォルトにしてくれるかもしれません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?