Search code examples
c#visual-studiovisual-studio-2022

Visual Studio 2022: default "Add null checks" on when using "Generate Constructor"


As the title suggests, is there a way to default the "Add null checks" box to true when using the "Generate Constructor" shortcut within a class?


Solution

  • Currently, Visual Studio 2022 does not provide a built-in way to set this option as the default for all future constructor generations.

    I recommend that you could give feedback in Visual Studio Developer Community.

    If you post feedback, you can provide a link to it here to see the progress of the issue.