Skip to content

IDE0047: Removing parentheses around a int array that is in a list, creates code that can not be compiled #78331

@Seadragon91

Description

@Seadragon91

17.13.6:

Steps to Reproduce:

The suggestion "IDE0047 Removing unecessary parentheses" around the array

var list = new List<int[]>
{
    ([1, 2, 3])
};

results into the code that can't be compiled and shows this errors:

Image

Expected Behavior:

Actual Behavior:

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