Skip to content

New Rule Idea: Do not use collection initializers with ImmutableArray #9681

Open
@Tim-Pohlmann

Description

Using a collection initializer with the ImmutableArray type, causes a NullReferenceException.

_ = new ImmutableArray<string> { "init" }; // NRE

SharpLab

Metadata

Assignees

No one assigned

    Labels

    Area: C#C# rules related issues.Type: Rule IdeaIdea for a rule that has NOT been specified.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions