Editorconfig Guide.e

Prefer simplified object creation

EditorConfig key: visual-basic-style-prefer-simplified-object-creation

Prefer simplified object creation

visual-basic-style-prefer-simplified-object-creation

This option controls whether object creation should be simplified by omitting the type when it can be inferred from context.

Default value:

true

Possible values:

  • true
  • false

Examples

true
Dim c As Customer = New With {.Name = "A"}
false
Dim c As Customer = New Customer With {.Name = "A"}