Editorconfig Guide.e

var elsewhere

EditorConfig key: csharp-style-var-elsewhere

var elsewhere

csharp-style-var-elsewhere

This option controls whether var should be preferred in cases not covered by the built-in types or apparent type options.

Default value:

false

Possible values:

  • true
  • false

Examples

true
var x = GetVal();
false
bool x = GetVal();