Skip to content

CollectionTools.Concat with param array looks dangerous #10

@william-gross

Description

@william-gross

I haven't tested but am concerned that CollectionTools.Concat( this IEnumerable<T> items, params T[] ts ), when called with a single param, could lead to ambiguity with Enumerable.Concat, or at a minimum lead to mistakenly passing a single object where a collection is meant, or vice versa. I suggest removing this method and instead using chained Enumerable.Append calls or passing an explicit array to Enumerable.Concat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions