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?

More than 1 year has passed since last update.

RiderでNull 許容認識コンテキストを有効にするスクリプトのテンプレートを作りたい

Last updated at Posted at 2023-11-25

はじめに

Riderで新しいスクリプトを作った際に、先頭に「#nullable enable」と挿入されるようなテンプレートの作り方をメモしておきます。

作成されるコード

#nullable enable
namespace NameSpace
{
    public class Hoge
    {
        
    }
}

作成手順

  1. Win : Ctrl + Alt + S キー
    Mac : Сmd + , キー
    でSettingsを開きます。
    image.png

  2. 右側の4つのボタンの上から2つの目のボタンでClassのテンプレートをクローンします。

  3. #nullable enable を追加したテンプレートを作成して完成です!
    image.png

使用例

追加したいディレクトリ上で右クリックをし、「Add」-> 「Class/Interface」を選択。
image.png

クラス名を入力してEnter。
image.png

クラスが作成されます。
image.png

参考URL

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?