Skip to content

SA1000 and IDE0090 contradict each other #23311

@vslynko

Description

@vslynko

From the example:

// csharp_style_implicit_object_creation_when_type_is_apparent = true
C c = new();
C c2 = new() { Field = 0 };

but SA1000 requires space after new keyword.
Which one should be given priority?

Suppressing one or another is not cool. It's about syntactic sugar, so the code should be more concise, not less.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions