Skip to content

ItemCollection should implement IList.Remove() #21046

@amwx

Description

@amwx

Is your feature request related to a problem? Please describe.

ItemCollection currently only implements all but IList.Remove()

int IList.Add(object? value) => Add(value);
void IList.Clear() => Clear();
void IList.Insert(int index, object? value) => Insert(index, value);
void IList.RemoveAt(int index) => RemoveAt(index);

If you're working with the ItemCollection, but only have it as a IList reference, you get an error that the collection is read only, even though it might not be because IList.Remove is handled on the ItemsSourceView but immediately throws.

Describe the solution you'd like

class ItemCollection
{
+ void IList.Remove(object value) => Remove(value)
}

Describe alternatives you've considered

No response

Additional context

No response

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