Editorconfig Guide.e

Prefer inlined variable declaration

EditorConfig key: csharp-style-inlined-variable-declaration

Prefer inlined variable declaration

csharp-style-inlined-variable-declaration

This option controls whether out variables should be declared inline at the call site rather than in a separate declaration.

Default value:

true

Possible values:

  • true
  • false

Examples

true
int.TryParse(s, out int x);
false
int x;
int.TryParse(s, out x);