Editorconfig Guide.e

Prefer deconstructed variable declaration

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

Prefer deconstructed variable declaration

csharp-style-deconstructed-variable-declaration

This option controls whether deconstruction should be preferred when introducing multiple variables from a tuple or a type with a Deconstruct method.

Default value:

true

Possible values:

  • true
  • false

Examples

true
var (x, y) = GetPoint();
false
var point = GetPoint();
var x = point.x;
var y = point.y;